Remove dangerous function

This commit is contained in:
int2001
2025-12-10 17:36:06 +00:00
parent 973b304a6d
commit f1d4de96e4
3 changed files with 2 additions and 18 deletions

View File

@@ -67,14 +67,6 @@ class Options extends CI_Controller {
$this->session->set_flashdata('success', __("Options saved")); $this->session->set_flashdata('success', __("Options saved"));
} }
// 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', __("Options saved"));
}
// Update logbook map within the options system // Update logbook map within the options system
$logbook_map_update_status = $this->optionslib->update('logbook_map', $this->input->post('logbookMap'), 'yes'); $logbook_map_update_status = $this->optionslib->update('logbook_map', $this->input->post('logbookMap'), 'yes');

View File

@@ -7,10 +7,8 @@ class Search extends CI_Controller {
parent::__construct(); parent::__construct();
$this->load->helper(array('form', 'url')); $this->load->helper(array('form', 'url'));
if($this->optionslib->get_option('global_search') != "true") { $this->load->model('user_model');
$this->load->model('user_model'); if(!$this->user_model->authorize(2)) { $this->session->set_flashdata('error', __("You're not allowed to do that!")); redirect('dashboard'); }
if(!$this->user_model->authorize(2)) { $this->session->set_flashdata('error', __("You're not allowed to do that!")); redirect('dashboard'); }
}
} }
public function index() { public function index() {

View File

@@ -51,12 +51,6 @@
<small id="themeHelp" class="form-text text-muted"><?= __("Global Theme Choice, this is used when users arent logged in."); ?></small> <small id="themeHelp" class="form-text text-muted"><?= __("Global Theme Choice, this is used when users arent logged in."); ?></small>
</div> </div>
<select class="form-select" id="globalSearch" name="globalSearch" style="display: none;">
<option value='true' <?php if($this->optionslib->get_option('global_search') == "true") { echo "selected=\"selected\""; } ?>><?= __("Enabled"); ?></option>
<option value='false' <?php if($this->optionslib->get_option('global_search') == "false") { echo "selected=\"selected\""; } ?>><?= __("Disabled"); ?></option>
</select>
<div class="mb-3"> <div class="mb-3">
<label for="logbookMap"><?= __("Logbook Map"); ?></label> <label for="logbookMap"><?= __("Logbook Map"); ?></label>
<select class="form-select" id="logbookMap" name="logbookMap" aria-describedby="logbookMapHelp" required> <select class="form-select" id="logbookMap" name="logbookMap" aria-describedby="logbookMapHelp" required>