From fcc16150520366a5f585760a520b546eace061e0 Mon Sep 17 00:00:00 2001 From: github-actions Date: Tue, 6 Aug 2024 00:20:18 +0200 Subject: [PATCH] authorize before unset default radio --- application/controllers/Radio.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/application/controllers/Radio.php b/application/controllers/Radio.php index aabdd14ec..2adfd6bc9 100644 --- a/application/controllers/Radio.php +++ b/application/controllers/Radio.php @@ -276,9 +276,6 @@ class Radio extends CI_Controller { function set_default_radio() { - // we unset the current default radio - $this->release_default_radio(); - // get the radio_id from POST $clean_radio_id = $this->security->xss_clean($this->input->post('radio_id')); @@ -289,6 +286,9 @@ class Radio extends CI_Controller { redirect('dashboard'); } + // we unset the current default radio + $this->release_default_radio(); + // Set the user_option and session data $this->user_options_model->set_option('cat', 'default_radio', array('radio_id' => $clean_radio_id)); $this->session->set_userdata('radio', $clean_radio_id);