summaryrefslogtreecommitdiff
path: root/modules/gallery/helpers/gallery.php
diff options
context:
space:
mode:
authormamouneyya <mamoun.diraneyya@gmail.com>2010-08-31 18:04:21 +0300
committermamouneyya <mamoun.diraneyya@gmail.com>2010-08-31 18:04:21 +0300
commit0b6664e8f9d19df025739bc4a0cf1821563d6b3d (patch)
tree5b1de2331d4a9d0eb8d97bbb74be6d794d6260a1 /modules/gallery/helpers/gallery.php
parent0a128bab0a788288c5291491a68bd1c9ab432825 (diff)
parent23d59dec7240dfa4bffe9d88f46a848e76ce0134 (diff)
Merge remote branch 'gallery3/master'
Diffstat (limited to 'modules/gallery/helpers/gallery.php')
-rw-r--r--modules/gallery/helpers/gallery.php18
1 files changed, 10 insertions, 8 deletions
diff --git a/modules/gallery/helpers/gallery.php b/modules/gallery/helpers/gallery.php
index d4078209..3f83b23d 100644
--- a/modules/gallery/helpers/gallery.php
+++ b/modules/gallery/helpers/gallery.php
@@ -25,12 +25,14 @@ class gallery_Core {
* down for maintenance" page.
*/
static function maintenance_mode() {
- $maintenance_mode = Kohana::config("core.maintenance_mode", false, false);
-
- if (Router::$controller != "login" && !empty($maintenance_mode) && !identity::active_user()->admin) {
- Router::$controller = "maintenance";
- Router::$controller_path = MODPATH . "gallery/controllers/maintenance.php";
- Router::$method = "index";
+ if (Router::$controller != "login" &&
+ Router::$controller != "combined" &&
+ module::get_var("gallery", "maintenance_mode", 0) &&
+ !identity::active_user()->admin) {
+ Session::instance()->set("continue_url", url::abs_site("admin/maintenance"));
+ Router::$controller = "login";
+ Router::$controller_path = MODPATH . "gallery/controllers/login.php";
+ Router::$method = "html";
}
}
@@ -58,7 +60,7 @@ class gallery_Core {
* @return string
*/
static function date_time($timestamp) {
- return date(module::get_var("gallery", "date_time_format", "Y-M-d H:i:s"), $timestamp);
+ return date(module::get_var("gallery", "date_time_format"), $timestamp);
}
/**
@@ -67,7 +69,7 @@ class gallery_Core {
* @return string
*/
static function date($timestamp) {
- return date(module::get_var("gallery", "date_format", "Y-M-d"), $timestamp);
+ return date(module::get_var("gallery", "date_format"), $timestamp);
}
/**