From 3e8d683ce4bf6cf41b67e61ebe76c32c129105e4 Mon Sep 17 00:00:00 2001 From: Bharat Mediratta Date: Sun, 1 Aug 2010 22:09:02 -0700 Subject: Use the login/html page for maintenance mode; we don't need the maintenance controller/view anymore. Fixes ticket #1267. --- modules/gallery/controllers/maintenance.php | 25 -------------- modules/gallery/helpers/gallery.php | 8 +++-- modules/gallery/views/login_ajax.html.php | 2 +- modules/gallery/views/maintenance.html.php | 53 ----------------------------- 4 files changed, 6 insertions(+), 82 deletions(-) delete mode 100644 modules/gallery/controllers/maintenance.php delete mode 100644 modules/gallery/views/maintenance.html.php (limited to 'modules') diff --git a/modules/gallery/controllers/maintenance.php b/modules/gallery/controllers/maintenance.php deleted file mode 100644 index 43fdfc55..00000000 --- a/modules/gallery/controllers/maintenance.php +++ /dev/null @@ -1,25 +0,0 @@ -set("continue_url", url::abs_site("admin/maintenance")); - print new View("maintenance.html"); - } -} \ No newline at end of file diff --git a/modules/gallery/helpers/gallery.php b/modules/gallery/helpers/gallery.php index 82b8a790..54d16322 100644 --- a/modules/gallery/helpers/gallery.php +++ b/modules/gallery/helpers/gallery.php @@ -26,11 +26,13 @@ class gallery_Core { */ static function maintenance_mode() { if (Router::$controller != "login" && + Router::$controller != "combined" && module::get_var("gallery", "maintenance_mode", 0) && !identity::active_user()->admin) { - Router::$controller = "maintenance"; - Router::$controller_path = MODPATH . "gallery/controllers/maintenance.php"; - Router::$method = "index"; + Session::instance()->set("continue_url", url::abs_site("admin/maintenance")); + Router::$controller = "login"; + Router::$controller_path = MODPATH . "gallery/controllers/login.php"; + Router::$method = "html"; } } diff --git a/modules/gallery/views/login_ajax.html.php b/modules/gallery/views/login_ajax.html.php index 88fe2389..a40d1950 100644 --- a/modules/gallery/views/login_ajax.html.php +++ b/modules/gallery/views/login_ajax.html.php @@ -43,7 +43,7 @@
  • - +
  • diff --git a/modules/gallery/views/maintenance.html.php b/modules/gallery/views/maintenance.html.php deleted file mode 100644 index 0b832a2d..00000000 --- a/modules/gallery/views/maintenance.html.php +++ /dev/null @@ -1,53 +0,0 @@ - - - - - <?= t("Gallery - maintenance mode") ?> - - - - -

    - -

    -

    - -

    - - - - - - -- cgit v1.2.3