mirror of
https://github.com/wavelog/wavelog.git
synced 2026-03-22 10:24:14 +00:00
add userid to band deletion
This commit is contained in:
@@ -118,8 +118,9 @@ class Band extends CI_Controller {
|
||||
|
||||
public function delete() {
|
||||
$id = $this->input->post('id', true);
|
||||
$userid = $this->session->userdata('user_id');
|
||||
$this->load->model('bands');
|
||||
$this->bands->delete($id);
|
||||
$this->bands->delete($id, $userid);
|
||||
}
|
||||
|
||||
public function activate() {
|
||||
|
||||
@@ -300,12 +300,8 @@ class Bands extends CI_Model {
|
||||
return true;
|
||||
}
|
||||
|
||||
function delete($id) {
|
||||
// Clean ID
|
||||
$clean_id = $this->security->xss_clean($id);
|
||||
|
||||
// Delete Mode
|
||||
$this->db->delete('bandxuser', array('id' => $clean_id));
|
||||
function delete($id, $userid) {
|
||||
$this->db->delete('bandxuser', array('id' => $id, 'userid' => $userid));
|
||||
}
|
||||
|
||||
function saveBand($id, $band) {
|
||||
|
||||
Reference in New Issue
Block a user