From 18f8933d7a2f80a51712c4b480583a6bceedb4b6 Mon Sep 17 00:00:00 2001 From: Peter Goodhall Date: Tue, 9 Feb 2021 17:46:47 +0000 Subject: [PATCH] [Options] Frontend Code added to enable or disable public search --- application/controllers/Options.php | 8 ++++++++ application/views/options/appearance.php | 9 +++++++++ 2 files changed, 17 insertions(+) diff --git a/application/controllers/Options.php b/application/controllers/Options.php index 561e8570..aace854c 100644 --- a/application/controllers/Options.php +++ b/application/controllers/Options.php @@ -78,6 +78,14 @@ class Options extends CI_Controller { $this->session->set_flashdata('success', 'Theme changed to '.$this->input->post('theme')); } + // Update theme choice within the options system + $search_update_status = $this->optionslib->update('global_search', $this->input->post('globalSearch')); + + // If theme update is complete set a flashsession with a success note + if($search_update_status == TRUE) { + $this->session->set_flashdata('success', 'Global Search changed to '.$this->input->post('globalSearch')); + } + // Update Lang choice within the options system $lang_update_status = $this->optionslib->update('language', $this->input->post('language')); diff --git a/application/views/options/appearance.php b/application/views/options/appearance.php index e27695c0..c1d5f824 100644 --- a/application/views/options/appearance.php +++ b/application/views/options/appearance.php @@ -57,6 +57,15 @@ Global Theme Choice, this is used when users arent logged in. +
+ + + This allows non logged in users to access the search functions. +
+