mirror of
https://github.com/wavelog/wavelog.git
synced 2026-03-22 10:24:14 +00:00
authorize before unset default radio
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user