From 00596f828d9e964ed008020ea104e96e77824578 Mon Sep 17 00:00:00 2001 From: Florian Pritz Date: Sun, 11 Jul 2010 20:43:57 +0200 Subject: don't delete if max age is 0 Signed-off-by: Florian Pritz --- system/application/controllers/file.php | 2 ++ 1 file changed, 2 insertions(+) (limited to 'system/application/controllers/file.php') diff --git a/system/application/controllers/file.php b/system/application/controllers/file.php index a07debc40..67f7c0b2e 100644 --- a/system/application/controllers/file.php +++ b/system/application/controllers/file.php @@ -130,6 +130,8 @@ class File extends Controller { function cron() { + if ($this->config->item('upload_max_age') == 0) return; + $oldest_time = (time()-$this->config->item('upload_max_age')); $small_upload_size = $this->config->item('small_upload_size'); $query = $this->db->query('SELECT hash, id FROM files WHERE date < ?', -- cgit v1.2.3-24-g4f1b