diff options
author | Treer <treer.git@the-bordello.com> | 2016-07-03 22:21:48 +1000 |
---|---|---|
committer | Treer <treer.git@the-bordello.com> | 2016-07-03 22:38:05 +1000 |
commit | 5c062aaec410ca1d5275a4a7079dadddb82c3097 (patch) | |
tree | ff9a7a78a344dcce8a13c2757ec88b41c7feb7d1 /include/nav.php | |
parent | b87106b6fe735365587d7683d8b639e0cf37842c (diff) | |
download | volse-hubzilla-5c062aaec410ca1d5275a4a7079dadddb82c3097.tar.gz volse-hubzilla-5c062aaec410ca1d5275a4a7079dadddb82c3097.tar.bz2 volse-hubzilla-5c062aaec410ca1d5275a4a7079dadddb82c3097.zip |
force immediate avatar update
Diffstat (limited to 'include/nav.php')
-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']); } |