summaryrefslogtreecommitdiff
path: root/modules/gallery/helpers/gallery_theme.php
diff options
context:
space:
mode:
Diffstat (limited to 'modules/gallery/helpers/gallery_theme.php')
-rw-r--r--modules/gallery/helpers/gallery_theme.php20
1 files changed, 18 insertions, 2 deletions
diff --git a/modules/gallery/helpers/gallery_theme.php b/modules/gallery/helpers/gallery_theme.php
index d75c6fc6..a6ca5eb7 100644
--- a/modules/gallery/helpers/gallery_theme.php
+++ b/modules/gallery/helpers/gallery_theme.php
@@ -76,13 +76,22 @@ class gallery_theme_Core {
$profiler = new Profiler();
$profiler->render();
}
+ $content = "";
if ($session->get("l10n_mode", false)) {
- return L10n_Client_Controller::l10n_form();
+ $content .= L10n_Client_Controller::l10n_form();
}
if ($session->get_once("after_install")) {
- return new View("welcome_message_loader.html");
+ $content .= new View("welcome_message_loader.html");
}
+
+ if (identity::active_user()->admin && upgrade_checker::should_auto_check()) {
+ $content .= '<script type="text/javascript">
+ $.ajax({url: "' . url::site("admin/upgrade_checker/check_now?csrf=" .
+ access::csrf_token()) . '"});
+ </script>';
+ }
+ return $content;
}
static function admin_page_bottom($theme) {
@@ -107,6 +116,13 @@ class gallery_theme_Core {
setInterval("adminReauthCheck();", 60 * 1000);
</script>';
+ if (upgrade_checker::should_auto_check()) {
+ $content .= '<script type="text/javascript">
+ $.ajax({url: "' . url::site("admin/upgrade_checker/check_now?csrf=" .
+ access::csrf_token()) . '"});
+ </script>';
+ }
+
if ($session->get("l10n_mode", false)) {
$content .= "\n" . L10n_Client_Controller::l10n_form();
}