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`
);
}
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`
'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;
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);