From 1e4c6eb11a3c6b0e4006556802e60968713a7bfd Mon Sep 17 00:00:00 2001 From: Cameron Date: Sun, 22 Jun 2014 00:01:14 -0700 Subject: [PATCH] Per page 'No Maintenance' constant added. ie. Add: define('NO_MAINTENANCE', true); to your script to disable maintenance redirection for that page. --- e107_admin/cpage.php | 13 +++++++------ e107_handlers/redirection_class.php | 5 +++++ 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/e107_admin/cpage.php b/e107_admin/cpage.php index d3d39a35c..106b986bd 100644 --- a/e107_admin/cpage.php +++ b/e107_admin/cpage.php @@ -449,7 +449,7 @@ class page_admin_ui extends e_admin_ui // PAGE LIST/EDIT and MENU EDIT modes. protected $fields = array( - 'checkboxes' => array('title'=> '', 'type' => null, 'width' =>'5%', 'forced'=> TRUE, 'thclass'=>'center', 'class'=>'center'), + 'checkboxes' => array('title'=> '', 'type' => null, 'width' =>'3%', 'forced'=> TRUE, 'thclass'=>'center', 'class'=>'center'), 'page_id' => array('title'=> LAN_ID, 'type' => 'text', 'tab' => 0, 'width'=>'5%', 'forced'=> TRUE, 'readParms'=>'link=sef&target=dialog'), 'page_title' => array('title'=> LAN_TITLE, 'tab' => 0, 'type' => 'text', 'inline'=>true, 'width'=>'25%', 'writeParms'=>'size=block-level'), 'page_chapter' => array('title'=> 'Book/Chapter', 'tab' => 0, 'type' => 'dropdown', 'width' => '20%', 'filter' => true, 'batch'=>true, 'inline'=>true), @@ -524,20 +524,21 @@ class page_admin_ui extends e_admin_ui $this->batchDelete = false; $this->fields = array( - 'checkboxes' => array('title'=> '', 'type' => null, 'width' =>'5%', 'forced'=> TRUE, 'thclass'=>'center', 'class'=>'center'), + 'checkboxes' => array('title'=> '', 'type' => null, 'width' =>'3%', 'forced'=> TRUE, 'thclass'=>'center', 'class'=>'center'), 'page_id' => array('title'=> 'ID', 'type'=>'text', 'tab' => 0, 'width'=>'5%', 'readParms'=>'','forced'=> TRUE), 'menu_image' => array('title' =>"Menu Image/Video", 'type' => 'image', 'width' => '110px', 'thclass' => 'left', 'class' => "left", 'nosort' => false, 'readParms'=>'thumb=140&thumb_urlraw=0&thumb_aw=140', 'readonly'=>false), + 'menu_icon' => array('title'=> LAN_ICON, 'type' => 'icon', 'width' => '80px', 'thclass' => 'center', 'class' => "center", 'nosort' => false, 'readParms'=>'thumb=80&thumb_urlraw=0&thumb_aw=80', 'readonly'=>false), + + 'menu_title' => array('title'=> "Menu Title", 'forced'=> TRUE, 'type' => 'text', 'inline'=>true, 'width'=>'20%'), + 'menu_name' => array('title'=> "Menu Name", 'type' => 'text', 'inline'=>true, 'width' => '10%','nolist'=>false, "help"=>"Will be listed in the Menu-Manager under this name"), 'menu_template' => array('title'=> "Menu Template", 'type' => 'dropdown', 'width' => '15%', 'filter' => true, 'batch'=>true, 'inline'=>true, 'writeParms'=>''), // 'page_author' => array('title'=> LAN_AUTHOR, 'tab' => 0, 'type' => 'user', 'data'=>'int','width' => 'auto', 'thclass' => 'left'), 'page_datestamp' => array('title'=> LAN_DATE, 'type' => 'datestamp', 'data'=>'int', 'width' => 'auto','writeParms'=>'auto=1&readonly=1'), - 'menu_icon' => array('title'=> LAN_ICON, 'type' => 'icon', 'width' => '80px', 'thclass' => 'center', 'class' => "center", 'nosort' => false, 'readParms'=>'thumb=80&thumb_urlraw=0&thumb_aw=80', 'readonly'=>false), - - 'menu_title' => array('title'=> "Menu Title", 'forced'=> TRUE, 'type' => 'text', 'inline'=>true, 'width'=>'25%'), - + 'page_chapter' => array('title'=> 'Book/Chapter', 'tab' => 0, 'type' => 'dropdown', 'width' => '20%', 'filter' => true, 'batch'=>true, 'inline'=>true), 'menu_text' => array('title'=> "Menu Body", 'type' => 'bbarea', 'data'=>'str', 'width' => 'auto', 'readParms' => 'expand=...&truncate=50&bb=1', 'writeParms'=>'media=page'), diff --git a/e107_handlers/redirection_class.php b/e107_handlers/redirection_class.php index e4fd545c1..f94a9d329 100644 --- a/e107_handlers/redirection_class.php +++ b/e107_handlers/redirection_class.php @@ -201,6 +201,11 @@ class redirection return; } + if(deftrue('NO_MAINTENANCE')) // per-page disable option. + { + return; + } + if(e107::getPref('maintainance_flag') && defset('e_PAGE') != 'secure_img_render.php') { // if not admin