From 855410af6b5db2be2c6da1caa70496ddfc20bde0 Mon Sep 17 00:00:00 2001 From: Peter Goodhall Date: Tue, 9 Feb 2021 17:52:23 +0000 Subject: [PATCH] [Search] Search is now available for public via enabling via Global Options This change removes the need for the option in cloudlog.php config and makes public search enabled via the frontend interface --- application/controllers/Search.php | 2 +- application/views/interface_assets/header.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/application/controllers/Search.php b/application/controllers/Search.php index 99c34f94..3ef1f1f6 100644 --- a/application/controllers/Search.php +++ b/application/controllers/Search.php @@ -8,7 +8,7 @@ class Search extends CI_Controller { parent::__construct(); $this->load->helper(array('form', 'url')); - if($this->config->item('public_search') != TRUE) { + if($this->optionslib->get_option('global_search') != "true") { $this->load->model('user_model'); if(!$this->user_model->authorize(2)) { $this->session->set_flashdata('notice', 'You\'re not allowed to do that!'); redirect('dashboard'); } } diff --git a/application/views/interface_assets/header.php b/application/views/interface_assets/header.php index 2ff3a70d..abfe91fc 100644 --- a/application/views/interface_assets/header.php +++ b/application/views/interface_assets/header.php @@ -183,7 +183,7 @@ - config->item('public_search') == TRUE || $this->session->userdata('user_type') >= 2) { ?> + optionslib->get_option('global_search') != "false" || $this->session->userdata('user_type') >= 2) { ?>