[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
This commit is contained in:
Peter Goodhall
2021-02-09 17:52:23 +00:00
parent 18f8933d7a
commit 855410af6b
2 changed files with 2 additions and 2 deletions

View File

@@ -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'); }
}

View File

@@ -183,7 +183,7 @@
<?php } ?>
</ul>
<?php if($this->config->item('public_search') == TRUE || $this->session->userdata('user_type') >= 2) { ?>
<?php if($this->optionslib->get_option('global_search') != "false" || $this->session->userdata('user_type') >= 2) { ?>
<form method="post" action="<?php echo site_url('search'); ?>" class="form-inline">
<input class="form-control mr-sm-2" id="nav-bar-search-input" type="search" name="callsign" placeholder="Search Callsign" aria-label="Search">