aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorhubzilla <git@macgirvin.com>2016-07-04 06:38:49 +1000
committerGitHub <noreply@github.com>2016-07-04 06:38:49 +1000
commitf46eecc1e7585e64069bb18918a2db057a16c480 (patch)
treeff9a7a78a344dcce8a13c2757ec88b41c7feb7d1 /include
parent523e7b5084b1ae62e151d1183f5150ffd9d9e60c (diff)
parent5c062aaec410ca1d5275a4a7079dadddb82c3097 (diff)
downloadvolse-hubzilla-f46eecc1e7585e64069bb18918a2db057a16c480.tar.gz
volse-hubzilla-f46eecc1e7585e64069bb18918a2db057a16c480.tar.bz2
volse-hubzilla-f46eecc1e7585e64069bb18918a2db057a16c480.zip
Merge pull request #448 from Treer/avatars
Force local cache update when user changes their profile picture
Diffstat (limited to 'include')
-rw-r--r--include/nav.php13
1 files changed, 13 insertions, 0 deletions
diff --git a/include/nav.php b/include/nav.php
index 6a79b6530..1fb0e98dc 100644
--- a/include/nav.php
+++ b/include/nav.php
@@ -255,6 +255,19 @@ $powered_by = '';
'$pleasewait' => t('Please wait...')
));
+
+ if(x($_SESSION, 'reload_avatar') && $observer) {
+ // The avatar has been changed on the server but the browser doesn't know that,
+ // force the browser to reload the image from the server instead of its cache.
+ $tpl = get_markup_template('force_image_reload.tpl');
+
+ App::$page['nav'] .= replace_macros($tpl, array(
+ '$imgUrl' => $observer['xchan_photo_m']
+ ));
+ unset($_SESSION['reload_avatar']);
+ }
+
+
call_hooks('page_header', App::$page['nav']);
}