Merge remote-tracking branch 'upstream/develop' into 1501-central-item-storage

This commit is contained in:
Michael Vogel 2015-02-01 13:28:32 +01:00
commit e02b982f77
9 changed files with 70 additions and 57 deletions

View File

@ -16,7 +16,7 @@ require_once('include/dbstructure.php');
define ( 'FRIENDICA_PLATFORM', 'Friendica');
define ( 'FRIENDICA_CODENAME', 'Ginger');
define ( 'FRIENDICA_VERSION', '3.3.2' );
define ( 'FRIENDICA_VERSION', '3.3.3-RC' );
define ( 'DFRN_PROTOCOL_VERSION', '2.23' );
define ( 'DB_UPDATE_VERSION', 1178 );
define ( 'EOL', "<br />\r\n" );

View File

@ -2,6 +2,7 @@
require_once("include/contact_selectors.php");
require_once("include/features.php");
require_once("mod/proxy.php");
/**
*
@ -533,7 +534,7 @@ function acl_lookup(&$a, $out_type = 'json') {
$x['data'] = array();
if(count($r)) {
foreach($r as $g) {
$x['photos'][] = $g['micro'];
$x['photos'][] = proxy_url($g['micro']);
$x['links'][] = $g['url'];
$x['suggestions'][] = $g['name'];
$x['data'][] = intval($g['id']);
@ -547,7 +548,7 @@ function acl_lookup(&$a, $out_type = 'json') {
foreach($r as $g){
$contacts[] = array(
"type" => "c",
"photo" => $g['micro'],
"photo" => proxy_url($g['micro']),
"name" => $g['name'],
"id" => intval($g['id']),
"network" => $g['network'],
@ -592,7 +593,7 @@ function acl_lookup(&$a, $out_type = 'json') {
// /nickname
$unknow_contacts[] = array(
"type" => "c",
"photo" => $row['author-avatar'],
"photo" => proxy_url($row['author-avatar']),
"name" => $row['author-name'],
"id" => '',
"network" => "unknown",

View File

@ -1643,7 +1643,8 @@
$user_info = api_get_user($a);
$ret = api_format_items($item,$user_info)[0];
$rets = api_format_items($item,$user_info);
$ret = $rets[0];
$data = array('$status' => $ret);
switch($type){

View File

@ -2,6 +2,7 @@
require_once("include/template_processor.php");
require_once("include/friendica_smarty.php");
require_once("mod/proxy.php");
if(! function_exists('replace_macros')) {
/**
@ -928,7 +929,7 @@ function micropro($contact, $redirect = false, $class = '', $textmode = false) {
. (($click) ? ' fakelink' : '') . '" '
. (($redir) ? ' target="redir" ' : '')
. (($url) ? ' href="' . $url . '"' : '') . $click . ' ><img class="contact-block-img' . $class . $sparkle . '" src="'
. $contact['micro'] . '" title="' . $contact['name'] . ' [' . $contact['url'] . ']" alt="' . $contact['name']
. proxy_url($contact['micro']) . '" title="' . $contact['name'] . ' [' . $contact['url'] . ']" alt="' . $contact['name']
. '" /></a></div>' . "\r\n";
}
}}

View File

@ -3,6 +3,7 @@
require_once('include/Contact.php');
require_once('include/socgraph.php');
require_once('include/contact_selectors.php');
require_once('mod/proxy.php');
function contacts_init(&$a) {
if(! local_user())
@ -681,7 +682,7 @@ function contacts_content(&$a) {
'id' => $rr['id'],
'alt_text' => $alt_text,
'dir_icon' => $dir_icon,
'thumb' => $rr['thumb'],
'thumb' => proxy_url($rr['thumb']),
'name' => $rr['name'],
'username' => $rr['name'],
'sparkle' => $sparkle,

View File

@ -106,8 +106,8 @@ function display_fetchauthor($a, $item) {
normalise_link($profiledata["url"]), $item["uid"]);
if (count($r)) {
$profiledata["photo"] = proxy_url($r[0]["photo"]);
$profiledata["address"] = bbcode($r[0]["location"]);
$profiledata["about"] = bbcode($r[0]["about"]);
$profiledata["address"] = proxy_parse_html(bbcode($r[0]["location"]));
$profiledata["about"] = proxy_parse_html(bbcode($r[0]["about"]));
if ($r[0]["nick"] != "")
$profiledata["nickname"] = $r[0]["nick"];
}
@ -118,9 +118,9 @@ function display_fetchauthor($a, $item) {
if ($profiledata["photo"] == "")
$profiledata["photo"] = proxy_url($r[0]["avatar"]);
if ($profiledata["address"] == "")
$profiledata["address"] = bbcode($r[0]["location"]);
$profiledata["address"] = proxy_parse_html(bbcode($r[0]["location"]));
if ($profiledata["about"] == "")
$profiledata["about"] = bbcode($r[0]["about"]);
$profiledata["about"] = proxy_parse_html(bbcode($r[0]["about"]));
if (($profiledata["nickname"] == "") AND ($r[0]["nick"] != ""))
$profiledata["nickname"] = $r[0]["nick"];
}
@ -184,8 +184,8 @@ function display_fetchauthor($a, $item) {
$r = q("SELECT `avatar`, `nick`, `location`, `about` FROM `unique_contacts` WHERE `url` = '%s'", normalise_link($profiledata["url"]));
if (count($r)) {
$profiledata["photo"] = proxy_url($r[0]["avatar"]);
$profiledata["address"] = bbcode($r[0]["location"]);
$profiledata["about"] = bbcode($r[0]["about"]);
$profiledata["address"] = proxy_parse_html(bbcode($r[0]["location"]));
$profiledata["about"] = proxy_parse_html(bbcode($r[0]["about"]));
if ($r[0]["nick"] != "")
$profiledata["nickname"] = $r[0]["nick"];
}

View File

@ -13,6 +13,8 @@ function viewcontacts_init(&$a) {
function viewcontacts_content(&$a) {
require_once("mod/proxy.php");
if((get_config('system','block_public')) && (! local_user()) && (! remote_user())) {
notice( t('Public access denied.') . EOL);
return;
@ -60,7 +62,7 @@ function viewcontacts_content(&$a) {
$contacts[] = array(
'id' => $rr['id'],
'img_hover' => sprintf( t('Visit %s\'s profile [%s]'), $rr['name'], $rr['url']),
'thumb' => $rr['thumb'],
'thumb' => proxy_url($rr['thumb']),
'name' => substr($rr['name'],0,20),
'username' => $rr['name'],
'url' => $url,

View File

@ -63,6 +63,13 @@ SQL="${Q1}${Q2}"
$MYSQL -uroot -proot -e "$SQL"
service mysql restart
#configure rudimentary mail server (local delivery only)
#add Friendica accounts for local user accounts, use email address like vagrant@friendica.dev, read the email with 'mail'.
debconf-set-selections <<< "postfix postfix/mailname string friendica.dev"
debconf-set-selections <<< "postfix postfix/main_mailer_type string 'Local Only'"
apt-get install -y postfix
apt-get install mailutils
#make the vagrant directory the docroot
sudo rm -rf /var/www/
sudo ln -fs /vagrant /var/www

View File

@ -27,7 +27,7 @@
<dt>{{$plugins.0}}</dt>
{{foreach $plugins.1 as $p}}
<dd>{{$p}}</dd>
<dd><a href="/admin/plugins/{{$p}}/">{{$p}}</a></dd>
{{/foreach}}
</dl>