mirror of
https://github.com/wavelog/wavelog.git
synced 2026-03-22 10:24:14 +00:00
Added user_id to del_option
This commit is contained in:
@@ -929,8 +929,8 @@ class User extends CI_Controller {
|
||||
}
|
||||
$this->user_options_model->set_option('map_custom','gridsquare',array('show'=>xss_clean($this->input->post('user_map_gridsquare_show', true))), $user_id);
|
||||
} else {
|
||||
$this->user_options_model->del_option('map_custom','icon', $user_id);
|
||||
$this->user_options_model->del_option('map_custom','gridsquare', $user_id);
|
||||
$this->user_options_model->del_option('map_custom','icon', null, $user_id);
|
||||
$this->user_options_model->del_option('map_custom','gridsquare', null, $user_id);
|
||||
}
|
||||
$this->user_options_model->set_option('header_menu', 'locations_quickswitch', array('boolean'=>xss_clean($this->input->post('user_locations_quickswitch', true))), $user_id);
|
||||
$this->user_options_model->set_option('header_menu', 'utc_headermenu', array('boolean'=>xss_clean($this->input->post('user_utc_headermenu', true))), $user_id);
|
||||
|
||||
@@ -52,8 +52,11 @@ class User_options_model extends CI_Model {
|
||||
return $this->db->query($sql, $array_sql_value);
|
||||
}
|
||||
|
||||
public function del_option($option_type, $option_name, $option_array=null) {
|
||||
$uid=$this->session->userdata('user_id');
|
||||
public function del_option($option_type, $option_name, $option_array = null, $uid = null) {
|
||||
if (($uid ?? '') == '') {
|
||||
$uid = $this->session->userdata('user_id');
|
||||
}
|
||||
|
||||
$sql_more = "";
|
||||
$array_sql_value = array($uid, $option_type, $option_name);
|
||||
if (is_array($option_array)) {
|
||||
@@ -62,7 +65,7 @@ class User_options_model extends CI_Model {
|
||||
$array_sql_value[] = $value;
|
||||
}
|
||||
}
|
||||
$sql='delete from user_options where user_id=? and option_type=? and option_name=?'.$sql_more;
|
||||
$sql='delete from user_options where user_id = ? and option_type = ? and option_name = ?'.$sql_more;
|
||||
return $this->db->query($sql, $array_sql_value);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user