From 2cc4778de8ed465a0c870f120ec06510b6828edd Mon Sep 17 00:00:00 2001 From: Florian Pritz Date: Fri, 13 Apr 2012 22:03:36 +0200 Subject: Hide delete button if user doesn't own the id It won't work anyway. Signed-off-by: Florian Pritz --- application/controllers/file.php | 2 ++ 1 file changed, 2 insertions(+) (limited to 'application/controllers') diff --git a/application/controllers/file.php b/application/controllers/file.php index f6a37eaf8..cb10e9e2f 100644 --- a/application/controllers/file.php +++ b/application/controllers/file.php @@ -200,6 +200,8 @@ class File extends CI_Controller { } } + $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); -- cgit v1.2.3-24-g4f1b