summaryrefslogtreecommitdiffstats
path: root/application/controllers
diff options
context:
space:
mode:
Diffstat (limited to 'application/controllers')
-rw-r--r--application/controllers/file.php7
1 files changed, 3 insertions, 4 deletions
diff --git a/application/controllers/file.php b/application/controllers/file.php
index 12ec9fa66..9458e9f53 100644
--- a/application/controllers/file.php
+++ b/application/controllers/file.php
@@ -96,7 +96,9 @@ class File extends CI_Controller {
$password = $this->file_mod->get_password();
$data["title"] = "Delete";
$data["id"] = $id;
- if ($password != "NULL") {
+ if ($id && !$this->file_mod->id_exists($id)) {
+ $data["msg"] = "Unkown ID.";
+ } elseif ($password != "NULL") {
if ($this->file_mod->delete_id($id)) {
$this->load->view($this->var->view_dir.'/header', $data);
$this->load->view($this->var->view_dir.'/deleted', $data);
@@ -109,9 +111,6 @@ class File extends CI_Controller {
if ($this->var->cli_client) {
$data["msg"] = "No password supplied.";
}
- if ($id && !$this->file_mod->id_exists($id)) {
- $data["msg"] = "Unkown ID.";
- }
}
$this->load->view($this->var->view_dir.'/header', $data);
$this->load->view($this->var->view_dir.'/delete_form', $data);