From c97c35162f5deee42bc384482d4673623e20ecc8 Mon Sep 17 00:00:00 2001 From: Florian Pritz Date: Sat, 26 Sep 2015 00:46:54 +0200 Subject: f/cron: Fix missing field when deleting unowned uploads Signed-off-by: Florian Pritz --- application/controllers/file.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'application/controllers/file.php') diff --git a/application/controllers/file.php b/application/controllers/file.php index f484c5260..7d701b75e 100644 --- a/application/controllers/file.php +++ b/application/controllers/file.php @@ -1062,10 +1062,11 @@ class File extends MY_Controller { "sess_expiration" => $this->config->item("sess_expiration"), ); - $query = $this->db->select('file_storage_id storage_id, id, user, date') + $query = $this->db->select('file_storage_id storage_id, files.id, user, files.date, hash') ->from('files') + ->join('file_storage', "file_storage.id = files.file_storage_id") ->where("user", 0) - ->where("date <", $oldest_session_time) + ->where("files.date <", $oldest_session_time) ->get()->result_array(); foreach($query as $row) { -- cgit v1.2.3-24-g4f1b