diff options
author | Rafael Bodill <rafi@sortex.co.il> | 2014-09-19 18:31:11 +0200 |
---|---|---|
committer | Rafael Bodill <rafi@sortex.co.il> | 2014-09-19 18:31:11 +0200 |
commit | 40fa09dcf09611afb34434a5c5c087b64f3fe8b6 (patch) | |
tree | 241069ecc414923f1ed45ba174b755e7524c83cc /application/models/mmultipaste.php | |
parent | d98ba32e9717a5e325d439e785c967f8cc44d095 (diff) |
Fixing multipaste delete queries
Diffstat (limited to 'application/models/mmultipaste.php')
-rw-r--r-- | application/models/mmultipaste.php | 15 |
1 files changed, 2 insertions, 13 deletions
diff --git a/application/models/mmultipaste.php b/application/models/mmultipaste.php index 9b1a7b16e..367e74787 100644 --- a/application/models/mmultipaste.php +++ b/application/models/mmultipaste.php @@ -90,19 +90,8 @@ class Mmultipaste extends CI_Model { public function delete_id($id) { - if (strpos($this->db->dbdriver, 'postgre') === FALSE) { - $this->db->query(' - DELETE m, mfm - FROM multipaste m - LEFT JOIN multipaste_file_map mfm ON mfm.multipaste_id = m.multipaste_id - WHERE m.url_id = ? - ', array($id)); - } else { - // TODO.rafi: Deletes multipaste + multipaste_file_map - // but not files. Is it supposed to? - $this->db->where('url_id', $id) - ->delete('multipaste'); - } + $this->db->where('url_id', $id) + ->delete('multipaste'); if ($this->id_exists($id)) { return false; |