summaryrefslogtreecommitdiff
path: root/modules/gallery/helpers
diff options
context:
space:
mode:
authorTim Almdal <tnalmdal@shaw.ca>2010-11-07 19:57:05 -0800
committerTim Almdal <tnalmdal@shaw.ca>2010-11-09 21:08:14 -0800
commit86790d4464c9f79e90adbe2cc7c24251371ad416 (patch)
tree5226b259952f054cca5a9d6d93c8e45f0e0ed465 /modules/gallery/helpers
parente87c502eded374e927c531ad10a78dac8ee70e64 (diff)
Return the admin check as part of the block structure as opposed to printing
it directly to the output. I had problems with the admin check messing up the AJAX calls on the module update page. And it went away after this fix.
Diffstat (limited to 'modules/gallery/helpers')
-rw-r--r--modules/gallery/helpers/gallery_theme.php6
1 files changed, 3 insertions, 3 deletions
diff --git a/modules/gallery/helpers/gallery_theme.php b/modules/gallery/helpers/gallery_theme.php
index 0d7cc44a..978c69a6 100644
--- a/modules/gallery/helpers/gallery_theme.php
+++ b/modules/gallery/helpers/gallery_theme.php
@@ -93,7 +93,7 @@ class gallery_theme_Core {
}
// Redirect to the root album when the admin session expires.
- $admin_session_redirect_check = '<script type="text/javascript">
+ $content = '<script type="text/javascript">
var adminReauthCheck = function() {
$.ajax({url: "' . url::site("admin?reauth_check=1") . '",
dataType: "json",
@@ -105,11 +105,11 @@ class gallery_theme_Core {
};
setInterval("adminReauthCheck();", 60 * 1000);
</script>';
- print $admin_session_redirect_check;
if ($session->get("l10n_mode", false)) {
- return L10n_Client_Controller::l10n_form();
+ $content .= "\n" . L10n_Client_Controller::l10n_form();
}
+ return $content;
}
static function credits() {