mirror of
https://github.com/friendica/friendica
synced 2024-11-20 13:03:41 +00:00
Use the contact picture instead of the profile picture
This commit is contained in:
parent
80103f8ad9
commit
7daf5ecde1
1 changed files with 13 additions and 7 deletions
|
@ -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,11 @@ function profile_sidebar($profile, $block = 0) {
|
|||
else
|
||||
$p["address"] = bbcode($p["location"]);
|
||||
|
||||
if (isset($p["photo"]))
|
||||
if (isset($p["contact_photo"])) {
|
||||
$p["photo"] = proxy_url($p["contact_photo"], false, PROXY_SIZE_SMALL);
|
||||
} elseif (isset($p["photo"])) {
|
||||
$p["photo"] = proxy_url($p["photo"], false, PROXY_SIZE_SMALL);
|
||||
|
||||
}
|
||||
if ($a->theme['template_engine'] === 'internal')
|
||||
$location = template_escape($location);
|
||||
|
||||
|
|
Loading…
Reference in a new issue