From 18b709659e26cdbe483f682039898b690b6caf96 Mon Sep 17 00:00:00 2001 From: Janos SUTO Date: Sun, 15 Mar 2020 11:39:40 +0100 Subject: [PATCH] enable preview of mobile search Signed-off-by: Janos SUTO --- config.php.in | 2 ++ webui/controller/common/layout-search.php | 2 +- webui/controller/message/headers.php | 2 +- webui/controller/message/view.php | 2 +- webui/controller/search/helper.php | 2 +- 5 files changed, 6 insertions(+), 4 deletions(-) diff --git a/config.php.in b/config.php.in index f6795679..128a15e7 100644 --- a/config.php.in +++ b/config.php.in @@ -357,6 +357,8 @@ if($session->get("theme") && preg_match("/^([a-zA-Z0-9\-\_]+)$/", $session->get( include("system/helper/detectmobilebrowser.php"); +$config['ENABLE_MOBILE_PREVIEW'] = 0; + // make sure auditors are restricted in a saas environment if($config['ENABLE_SAAS'] == 1) { $config['RESTRICTED_AUDITOR'] = 1; } if($session->get("username") == 'auditor@local' || isset($_SERVER['argv'][2]) ) { $config['RESTRICTED_AUDITOR'] = 0; } diff --git a/webui/controller/common/layout-search.php b/webui/controller/common/layout-search.php index e932328a..e0145f2f 100644 --- a/webui/controller/common/layout-search.php +++ b/webui/controller/common/layout-search.php @@ -6,7 +6,7 @@ class ControllerCommonLayoutSearch extends Controller { $this->data['title'] = $this->document->title; - if(MOBILE_DEVICE) { + if(ENABLE_MOBILE_PREVIEW && MOBILE_DEVICE) { $this->template = "common/layout-search-mobile.tpl"; } else { $this->template = "common/layout-search.tpl"; diff --git a/webui/controller/message/headers.php b/webui/controller/message/headers.php index 9f871307..66aa6bb2 100644 --- a/webui/controller/message/headers.php +++ b/webui/controller/message/headers.php @@ -6,7 +6,7 @@ class ControllerMessageHeaders extends Controller { public function index(){ $this->id = "content"; - if(MOBILE_DEVICE) { + if(ENABLE_MOBILE_PREVIEW && MOBILE_DEVICE) { $this->template = "message/headers-mobile.tpl"; } else { $this->template = "message/headers.tpl"; diff --git a/webui/controller/message/view.php b/webui/controller/message/view.php index 40e3094e..e08dcd4e 100644 --- a/webui/controller/message/view.php +++ b/webui/controller/message/view.php @@ -6,7 +6,7 @@ class ControllerMessageView extends Controller { public function index(){ $this->id = "content"; - if(MOBILE_DEVICE) { + if(ENABLE_MOBILE_PREVIEW && MOBILE_DEVICE) { $this->template = "message/view-mobile.tpl"; } else { $this->template = "message/view.tpl"; diff --git a/webui/controller/search/helper.php b/webui/controller/search/helper.php index a8f973e9..399f3233 100644 --- a/webui/controller/search/helper.php +++ b/webui/controller/search/helper.php @@ -23,7 +23,7 @@ class ControllerSearchHelper extends Controller { public function index(){ $this->id = "content"; - if(MOBILE_DEVICE) { + if(ENABLE_MOBILE_PREVIEW && MOBILE_DEVICE) { $this->template = "search/helper-mobile.tpl"; } else { $this->template = "search/helper.tpl";