Bugfix: The bbcode conversion of the profile was inconsistent
This commit is contained in:
parent
2e0ebcd1c8
commit
d077dbbcde
3 changed files with 19 additions and 25 deletions
|
@ -192,9 +192,6 @@ function unmark_for_death($contact) {
|
||||||
}}
|
}}
|
||||||
|
|
||||||
function get_contact_details_by_url($url, $uid = -1) {
|
function get_contact_details_by_url($url, $uid = -1) {
|
||||||
require_once("mod/proxy.php");
|
|
||||||
require_once("include/bbcode.php");
|
|
||||||
|
|
||||||
if ($uid == -1)
|
if ($uid == -1)
|
||||||
$uid = local_user();
|
$uid = local_user();
|
||||||
|
|
||||||
|
@ -268,15 +265,6 @@ function get_contact_details_by_url($url, $uid = -1) {
|
||||||
} else
|
} else
|
||||||
$profile["cid"] = 0;
|
$profile["cid"] = 0;
|
||||||
|
|
||||||
if (isset($profile["photo"]))
|
|
||||||
$profile["photo"] = proxy_url($profile["photo"], false, PROXY_SIZE_SMALL);
|
|
||||||
|
|
||||||
if (isset($profile["location"]))
|
|
||||||
$profile["location"] = bbcode($profile["location"]);
|
|
||||||
|
|
||||||
if (isset($profile["about"]))
|
|
||||||
$profile["about"] = bbcode($profile["about"]);
|
|
||||||
|
|
||||||
if (($profile["cid"] == 0) AND ($profile["network"] == NETWORK_DIASPORA)) {
|
if (($profile["cid"] == 0) AND ($profile["network"] == NETWORK_DIASPORA)) {
|
||||||
$profile["location"] = "";
|
$profile["location"] = "";
|
||||||
$profile["about"] = "";
|
$profile["about"] = "";
|
||||||
|
|
|
@ -4,7 +4,8 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
require_once('include/forums.php');
|
require_once('include/forums.php');
|
||||||
|
require_once('include/bbcode.php');
|
||||||
|
require_once("mod/proxy.php");
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
|
@ -108,7 +109,6 @@ if(! function_exists('profile_load')) {
|
||||||
else
|
else
|
||||||
$a->page['aside'] .= profile_sidebar($a->profile, $block);
|
$a->page['aside'] .= profile_sidebar($a->profile, $block);
|
||||||
|
|
||||||
|
|
||||||
/*if(! $block)
|
/*if(! $block)
|
||||||
$a->page['aside'] .= contact_block();*/
|
$a->page['aside'] .= contact_block();*/
|
||||||
|
|
||||||
|
@ -360,6 +360,15 @@ if(! function_exists('profile_sidebar')) {
|
||||||
$p[$k] = $v;
|
$p[$k] = $v;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (isset($p["about"]))
|
||||||
|
$p["about"] = bbcode($p["about"]);
|
||||||
|
|
||||||
|
if (isset($p["location"]))
|
||||||
|
$p["location"] = bbcode($p["location"]);
|
||||||
|
|
||||||
|
if (isset($p["photo"]))
|
||||||
|
$p["photo"] = proxy_url($p["photo"], false, PROXY_SIZE_SMALL);
|
||||||
|
|
||||||
if($a->theme['template_engine'] === 'internal')
|
if($a->theme['template_engine'] === 'internal')
|
||||||
$location = template_escape($location);
|
$location = template_escape($location);
|
||||||
|
|
||||||
|
|
|
@ -89,15 +89,13 @@ function display_init(&$a) {
|
||||||
}
|
}
|
||||||
|
|
||||||
function display_fetchauthor($a, $item) {
|
function display_fetchauthor($a, $item) {
|
||||||
require_once("mod/proxy.php");
|
|
||||||
require_once("include/bbcode.php");
|
|
||||||
|
|
||||||
$profiledata = array();
|
$profiledata = array();
|
||||||
$profiledata["uid"] = -1;
|
$profiledata["uid"] = -1;
|
||||||
$profiledata["nickname"] = $item["author-name"];
|
$profiledata["nickname"] = $item["author-name"];
|
||||||
$profiledata["name"] = $item["author-name"];
|
$profiledata["name"] = $item["author-name"];
|
||||||
$profiledata["picdate"] = "";
|
$profiledata["picdate"] = "";
|
||||||
$profiledata["photo"] = proxy_url($item["author-avatar"], false, PROXY_SIZE_SMALL);
|
$profiledata["photo"] = $item["author-avatar"];
|
||||||
$profiledata["url"] = $item["author-link"];
|
$profiledata["url"] = $item["author-link"];
|
||||||
$profiledata["network"] = $item["network"];
|
$profiledata["network"] = $item["network"];
|
||||||
|
|
||||||
|
@ -174,9 +172,9 @@ function display_fetchauthor($a, $item) {
|
||||||
$r[0]["about"] = "";
|
$r[0]["about"] = "";
|
||||||
}
|
}
|
||||||
|
|
||||||
$profiledata["photo"] = proxy_url($r[0]["photo"], false, PROXY_SIZE_SMALL);
|
$profiledata["photo"] = $r[0]["photo"];
|
||||||
$profiledata["address"] = bbcode($r[0]["location"]);
|
$profiledata["address"] = $r[0]["location"];
|
||||||
$profiledata["about"] = bbcode($r[0]["about"]);
|
$profiledata["about"] = $r[0]["about"];
|
||||||
if ($r[0]["nick"] != "")
|
if ($r[0]["nick"] != "")
|
||||||
$profiledata["nickname"] = $r[0]["nick"];
|
$profiledata["nickname"] = $r[0]["nick"];
|
||||||
}
|
}
|
||||||
|
@ -185,11 +183,11 @@ function display_fetchauthor($a, $item) {
|
||||||
$r = q("SELECT `avatar`, `nick`, `location`, `about` FROM `unique_contacts` WHERE `url` = '%s'", dbesc(normalise_link($profiledata["url"])));
|
$r = q("SELECT `avatar`, `nick`, `location`, `about` FROM `unique_contacts` WHERE `url` = '%s'", dbesc(normalise_link($profiledata["url"])));
|
||||||
if (count($r)) {
|
if (count($r)) {
|
||||||
if ($profiledata["photo"] == "")
|
if ($profiledata["photo"] == "")
|
||||||
$profiledata["photo"] = proxy_url($r[0]["avatar"], false, PROXY_SIZE_SMALL);
|
$profiledata["photo"] = $r[0]["avatar"];
|
||||||
if (($profiledata["address"] == "") AND ($profiledata["network"] != NETWORK_DIASPORA))
|
if (($profiledata["address"] == "") AND ($profiledata["network"] != NETWORK_DIASPORA))
|
||||||
$profiledata["address"] = bbcode($r[0]["location"]);
|
$profiledata["address"] = $r[0]["location"];
|
||||||
if (($profiledata["about"] == "") AND ($profiledata["network"] != NETWORK_DIASPORA))
|
if (($profiledata["about"] == "") AND ($profiledata["network"] != NETWORK_DIASPORA))
|
||||||
$profiledata["about"] = bbcode($r[0]["about"]);
|
$profiledata["about"] = $r[0]["about"];
|
||||||
if (($profiledata["nickname"] == "") AND ($r[0]["nick"] != ""))
|
if (($profiledata["nickname"] == "") AND ($r[0]["nick"] != ""))
|
||||||
$profiledata["nickname"] = $r[0]["nick"];
|
$profiledata["nickname"] = $r[0]["nick"];
|
||||||
}
|
}
|
||||||
|
@ -212,7 +210,6 @@ function display_content(&$a, $update = 0) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
require_once("include/bbcode.php");
|
|
||||||
require_once('include/security.php');
|
require_once('include/security.php');
|
||||||
require_once('include/conversation.php');
|
require_once('include/conversation.php');
|
||||||
require_once('include/acl_selectors.php');
|
require_once('include/acl_selectors.php');
|
||||||
|
|
Loading…
Reference in a new issue