mirror of
https://github.com/wavelog/wavelog.git
synced 2026-03-22 10:24:14 +00:00
save the band unit and write it in session and user_options
This commit is contained in:
@@ -155,4 +155,15 @@ class Band extends CI_Controller {
|
||||
echo json_encode(array('message' => 'OK'));
|
||||
return;
|
||||
}
|
||||
|
||||
public function saveBandUnit() {
|
||||
$unit = $this->security->xss_clean($this->input->post('unit'));
|
||||
$band_id = $this->security->xss_clean($this->input->post('band_id'));
|
||||
|
||||
$this->load->model('bands');
|
||||
$band = $this->bands->getband($band_id)->row()->band;
|
||||
|
||||
$this->user_options_model->set_option('frequency', 'unit', array($band => $unit));
|
||||
$this->session->set_userdata('qrgunit_'.$band, $unit);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user