summaryrefslogtreecommitdiff
path: root/modules/gallery/helpers/gallery_theme.php
diff options
context:
space:
mode:
authorNathan Kinkade <nkinkade@nkinka.de>2010-02-10 20:57:53 +0000
committerNathan Kinkade <nkinkade@nkinka.de>2010-02-10 20:57:53 +0000
commit10e36fcf1b5acf07c5cc128105af03fb09aac89e (patch)
treec5e815b0a4c540d0dc7bc5f90dd1eae3df31017e /modules/gallery/helpers/gallery_theme.php
parent052476ef44ca801766cbd6bdbfe42d5a0a362e52 (diff)
parent8ef08d20883d9b9aa0b7560ce3bf6da8a6632149 (diff)
Merge branch 'master' of git://github.com/gallery/gallery3
Diffstat (limited to 'modules/gallery/helpers/gallery_theme.php')
-rw-r--r--modules/gallery/helpers/gallery_theme.php11
1 files changed, 11 insertions, 0 deletions
diff --git a/modules/gallery/helpers/gallery_theme.php b/modules/gallery/helpers/gallery_theme.php
index 0018fd9a..9ffeb911 100644
--- a/modules/gallery/helpers/gallery_theme.php
+++ b/modules/gallery/helpers/gallery_theme.php
@@ -90,6 +90,17 @@ class gallery_theme_Core {
$profiler = new Profiler();
$profiler->render();
}
+
+ // 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>';
+ print $admin_session_redirect_check;
+
if ($session->get("l10n_mode", false)) {
return L10n_Client_Controller::l10n_form();
}