aboutsummaryrefslogtreecommitdiffstats
path: root/boot.php
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2011-11-12 17:50:14 -0800
committerfriendica <info@friendica.com>2011-11-12 17:50:14 -0800
commitbbf857ba39c87cf907be88ecd013e961f5ad1a7f (patch)
tree2cac6c443698572d879eb6382fb1fc71671cb333 /boot.php
parent240a3431cc524f349cbd997fded9f8bbb88696fa (diff)
downloadvolse-hubzilla-bbf857ba39c87cf907be88ecd013e961f5ad1a7f.tar.gz
volse-hubzilla-bbf857ba39c87cf907be88ecd013e961f5ad1a7f.tar.bz2
volse-hubzilla-bbf857ba39c87cf907be88ecd013e961f5ad1a7f.zip
add revision date to main profile photo to overcome cache when updated, other photos (e.g. conversations) must wait for cache update
Diffstat (limited to 'boot.php')
-rw-r--r--boot.php14
1 files changed, 8 insertions, 6 deletions
diff --git a/boot.php b/boot.php
index be33594e4..a3e485527 100644
--- a/boot.php
+++ b/boot.php
@@ -796,17 +796,17 @@ function profile_load(&$a, $nickname, $profile = 0) {
if($profile) {
$profile_int = intval($profile);
- $r = q("SELECT `profile`.`uid` AS `profile_uid`, `profile`.* , `user`.* FROM `profile`
- LEFT JOIN `user` ON `profile`.`uid` = `user`.`uid`
- WHERE `user`.`nickname` = '%s' AND `profile`.`id` = %d LIMIT 1",
+ $r = q("SELECT `profile`.`uid` AS `profile_uid`, `profile`.* , `contact`.`avatar-date` AS picdate, `user`.* FROM `profile`
+ left join `contact` on `contact`.`uid` = `profile`.`uid` LEFT JOIN `user` ON `profile`.`uid` = `user`.`uid`
+ WHERE `user`.`nickname` = '%s' AND `profile`.`id` = %d and `contact`.`self` = 1 LIMIT 1",
dbesc($nickname),
intval($profile_int)
);
}
if(! count($r)) {
- $r = q("SELECT `profile`.`uid` AS `profile_uid`, `profile`.* , `user`.* FROM `profile`
- LEFT JOIN `user` ON `profile`.`uid` = `user`.`uid`
- WHERE `user`.`nickname` = '%s' AND `profile`.`is-default` = 1 LIMIT 1",
+ $r = q("SELECT `profile`.`uid` AS `profile_uid`, `profile`.* , `contact`.`avatar-date` AS picdate, `user`.* FROM `profile`
+ left join `contact` on `contact`.`uid` = `profile`.`uid` LEFT JOIN `user` ON `profile`.`uid` = `user`.`uid`
+ WHERE `user`.`nickname` = '%s' AND `profile`.`is-default` = 1 and `contact`.`self` = 1 LIMIT 1",
dbesc($nickname)
);
}
@@ -881,6 +881,8 @@ function profile_sidebar($profile, $block = 0) {
if((! is_array($profile)) && (! count($profile)))
return $o;
+ $profile['picdate'] = urlencode($profile['picdate']);
+
call_hooks('profile_sidebar_enter', $profile);