X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=include%2Fidentity.php;h=25b24f289b6f8b20198364d7690cf01e56d05d16;hb=d649873f804f9ed77e69ef6cd12af4a263233945;hp=3ab25cdc45724e68e1cba99869f7ceeb23ec2954;hpb=e884090efa4d0934a02e6844c97bbf54cdcc9c13;p=friendica.git diff --git a/include/identity.php b/include/identity.php index 3ab25cdc45..25b24f289b 100644 --- a/include/identity.php +++ b/include/identity.php @@ -152,7 +152,9 @@ function get_profiledata_by_nick($nickname, $uid = 0, $profile = 0) { if ($profile) { $profile_int = intval($profile); - $r = q("SELECT `contact`.`id` AS `contact_id`, `profile`.`uid` AS `profile_uid`, `profile`.*, + $r = q("SELECT `contact`.`id` AS `contact_id`, `contact`.`photo` AS `contact_photo`, + `contact`.`thumb` AS `contact_thumb`, `contact`.`micro` AS `contact_micro`, + `profile`.`uid` AS `profile_uid`, `profile`.*, `contact`.`avatar-date` AS picdate, `contact`.`addr`, `user`.* FROM `profile` INNER JOIN `contact` on `contact`.`uid` = `profile`.`uid` AND `contact`.`self` @@ -163,7 +165,9 @@ function get_profiledata_by_nick($nickname, $uid = 0, $profile = 0) { ); } if (!dbm::is_result($r)) { - $r = q("SELECT `contact`.`id` AS `contact_id`, `profile`.`uid` AS `profile_uid`, `profile`.*, + $r = q("SELECT `contact`.`id` AS `contact_id`, `contact`.`photo` as `contact_photo`, + `contact`.`thumb` AS `contact_thumb`, `contact`.`micro` AS `contact_micro`, + `profile`.`uid` AS `profile_uid`, `profile`.*, `contact`.`avatar-date` AS picdate, `contact`.`addr`, `user`.* FROM `profile` INNER JOIN `contact` ON `contact`.`uid` = `profile`.`uid` AND `contact`.`self` @@ -365,9 +369,9 @@ function profile_sidebar($profile, $block = 0) { 'fullname' => $profile['name'], 'firstname' => $firstname, 'lastname' => $lastname, - 'photo300' => App::get_baseurl() . '/photo/custom/300/' . $profile['uid'] . '.jpg', - 'photo100' => App::get_baseurl() . '/photo/custom/100/' . $profile['uid'] . '.jpg', - 'photo50' => App::get_baseurl() . '/photo/custom/50/' . $profile['uid'] . '.jpg', + 'photo300' => $profile['contact_photo'], + 'photo100' => $profile['contact_thumb'], + 'photo50' => $profile['contact_micro'], ); else $diaspora = false; @@ -410,9 +414,9 @@ function profile_sidebar($profile, $block = 0) { else $p["address"] = bbcode($p["location"]); - if (isset($p["photo"])) + if (isset($p["photo"])) { $p["photo"] = proxy_url($p["photo"], false, PROXY_SIZE_SMALL); - + } if ($a->theme['template_engine'] === 'internal') $location = template_escape($location);