diff options
author | hubzilla <git@macgirvin.com> | 2016-07-04 06:38:49 +1000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-07-04 06:38:49 +1000 |
commit | f46eecc1e7585e64069bb18918a2db057a16c480 (patch) | |
tree | ff9a7a78a344dcce8a13c2757ec88b41c7feb7d1 /include | |
parent | 523e7b5084b1ae62e151d1183f5150ffd9d9e60c (diff) | |
parent | 5c062aaec410ca1d5275a4a7079dadddb82c3097 (diff) | |
download | volse-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.php | 13 |
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']); } |