diff options
author | Florian Pritz <bluewind@xinu.at> | 2012-05-01 23:39:57 +0200 |
---|---|---|
committer | Florian Pritz <bluewind@xinu.at> | 2012-05-03 00:50:17 +0200 |
commit | d6c76b1fe30fc8065c985c31df633c3c6cbbed9f (patch) | |
tree | f7ee89a9ccff3d16e14e89b045493f0b29fe4c3b /application/controllers | |
parent | 8f93ff5aea99ca98693a47d3f09043f65dee9ac2 (diff) |
add ID/info to display more information about a file
The table is shared with the old delete_form, but it doesn't display the
delete button in info mode.
Signed-off-by: Florian Pritz <bluewind@xinu.at>
Diffstat (limited to 'application/controllers')
-rw-r--r-- | application/controllers/file.php | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/application/controllers/file.php b/application/controllers/file.php index 751b72ce2..079802dbc 100644 --- a/application/controllers/file.php +++ b/application/controllers/file.php @@ -180,13 +180,12 @@ class File extends CI_Controller { echo $cached; } - // Allow users to delete IDs if their password matches the one used when uploading + // Allow users to delete their own IDs function delete() { $this->muser->require_access(); $id = $this->uri->segment(3); - $this->data["title"] .= " - Delete $id"; $this->data["id"] = $id; $process = $this->input->post("process"); @@ -194,11 +193,6 @@ class File extends CI_Controller { $process = true; } - $this->data["filedata"] = $this->file_mod->get_filedata($id); - if ($this->data["filedata"]) { - $this->data["filedata"]["size"] = filesize($this->file_mod->file($this->data["filedata"]["hash"])); - } - if ($id && !$this->file_mod->id_exists($id)) { $this->output->set_status_header(404); $this->data["msg"] = "Unknown ID."; @@ -213,11 +207,10 @@ class File extends CI_Controller { } } + $this->data["filedata"] = $this->file_mod->get_filedata($id); $this->data["can_delete"] = $this->data["filedata"]["user"] == $this->muser->get_userid(); - $this->load->view($this->var->view_dir.'/header', $this->data); - $this->load->view($this->var->view_dir.'/delete_form', $this->data); - $this->load->view($this->var->view_dir.'/footer', $this->data); + $this->file_mod->display_info($id); } // Handle pastes |