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.php24
1 files changed, 16 insertions, 8 deletions
diff --git a/modules/gallery/helpers/gallery_theme.php b/modules/gallery/helpers/gallery_theme.php
index 9ffeb911..d6944323 100644
--- a/modules/gallery/helpers/gallery_theme.php
+++ b/modules/gallery/helpers/gallery_theme.php
@@ -92,13 +92,18 @@ class gallery_theme_Core {
}
// Redirect to the root album when the admin session expires.
- $redirect_url = url::abs_site("");
- $admin_area_timeout = 1000 * module::get_var("gallery", "admin_area_timeout");
$admin_session_redirect_check = '<script type="text/javascript">
- var page_loaded_timestamp = new Date();
- setInterval("if (new Date() - page_loaded_timestamp > ' . $admin_area_timeout .
- ') document.location = \'' . $redirect_url . '\';", 60 * 1000);
- </script>';
+ var adminReauthCheck = function() {
+ $.ajax({url: "' . url::site("admin?reauth_check=1") . '",
+ dataType: "json",
+ success: function(data){
+ if ("location" in data) {
+ document.location = data.location;
+ }
+ }});
+ };
+ setInterval("adminReauthCheck();", 60 * 1000);
+ </script>';
print $admin_session_redirect_check;
if ($session->get("l10n_mode", false)) {
@@ -107,9 +112,12 @@ class gallery_theme_Core {
}
static function credits() {
- return "<li class=\"g-first\">" .
+ $version_string = SafeString::of_safe_html(
+ '<bdo dir="ltr">Gallery ' . gallery::VERSION . '</bdo>');
+ return "<li class=\"g-first\">" .
t(module::get_var("gallery", "credits"),
- array("url" => "http://gallery.menalto.com", "version" => gallery::VERSION)) .
+ array("url" => "http://gallery.menalto.com",
+ "gallery_version" => $version_string)) .
"</li>";
}