From 3bd404b17fc98c46c35551e338eea742572b09ed Mon Sep 17 00:00:00 2001 From: Cameron Date: Wed, 20 Aug 2014 22:21:00 -0700 Subject: [PATCH] Fix for maintenance flag check. --- e107_handlers/redirection_class.php | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/e107_handlers/redirection_class.php b/e107_handlers/redirection_class.php index a6bdbc920..79499ed6b 100644 --- a/e107_handlers/redirection_class.php +++ b/e107_handlers/redirection_class.php @@ -209,9 +209,14 @@ class redirection if(e107::getPref('maintainance_flag') && defset('e_PAGE') != 'secure_img_render.php') { // if not admin - if(!ADMIN + + $allowed = e107::getPref('maintainance_flag'); + + // if(!ADMIN // or if not mainadmin - ie e_UC_MAINADMIN - || (e_UC_MAINADMIN == e107::getPref('maintainance_flag') && !getperms('0'))) + // || (e_UC_MAINADMIN == e107::getPref('maintainance_flag') && !getperms('0'))) + + if(!check_class($allowed) && !getperms('0')) { // 307 Temporary Redirect $this->redirect(SITEURL.'sitedown.php', TRUE, 307);