Skip to content

Commit

Permalink
fully reload page when changing avatar settings
Browse files Browse the repository at this point in the history
their avatar in top right of staffcp will now use the new provider right away so they can save time and not need to reload the page again to see changes
  • Loading branch information
tadhgboyle committed May 12, 2021
1 parent dd39ea8 commit 886d24e
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion modules/Core/pages/panel/avatars.php
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,9 @@

//Log::getInstance()->log(Log::Action('admin/core/avatar'));

$success = $language->get('admin', 'avatar_settings_updated_successfully');
Session::flash('avatar_success', $language->get('admin', 'avatar_settings_updated_successfully'));
Redirect::to(URL::build('/panel/core/avatars'));

} else
$errors = array($language->get('general', 'invalid_token'));
}
Expand All @@ -85,6 +87,13 @@
'SUCCESS_TITLE' => $language->get('general', 'success')
));

if (Session::exists('avatar_success')) {
$smarty->assign(array(
'SUCCESS' => Session::flash('avatar_success'),
'SUCCESS_TITLE' => $language->get('general', 'success')
));
}

if (isset($errors) && count($errors))
$smarty->assign(array(
'ERRORS' => $errors,
Expand Down

0 comments on commit 886d24e

Please sign in to comment.