From 3715f4a81a22232ce268efced31e1893eff7d043 Mon Sep 17 00:00:00 2001 From: Florian Pritz Date: Tue, 16 Mar 2010 17:31:20 +0100 Subject: fix message when delete password is wrong Signed-off-by: Florian Pritz --- system/application/models/file_mod.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'system/application/models') diff --git a/system/application/models/file_mod.php b/system/application/models/file_mod.php index 0bc12c5b2..2d7574a60 100644 --- a/system/application/models/file_mod.php +++ b/system/application/models/file_mod.php @@ -98,12 +98,17 @@ class File_mod extends Model { WHERE `id` = ? AND password = ? LIMIT 1'; - $query = $this->db->query($sql, array($id, $password)); + $this->db->query($sql, array($id, $password)); + + if($this->id_exists($id)) { + return false; + } if($this->unused_file($filedata['hash'])) { unlink($this->file($filedata['hash'])); @rmdir($this->folder($filedata['hash'])); } + return true; } private function random_id($min_length, $max_length) -- cgit v1.2.3-24-g4f1b