diff options
author | Florian Pritz <bluewind@xinu.at> | 2013-07-16 14:46:15 +0200 |
---|---|---|
committer | Florian Pritz <bluewind@xinu.at> | 2013-07-16 14:46:15 +0200 |
commit | c51d48487c65869cbb0aa8d612ba3c0d466863b7 (patch) | |
tree | 8c6a1f30701636871ebaec1bdae6df197d06a8bd /application | |
parent | 9353d72c8602afd35e692a698ba619567cd35109 (diff) |
Fix handling of upload_max_age = 0
cron code already handled this correctly, valid() didn't.
Signed-off-by: Florian Pritz <bluewind@xinu.at>
Diffstat (limited to 'application')
-rw-r--r-- | application/controllers/file.php | 1 | ||||
-rw-r--r-- | application/models/mfile.php | 3 |
2 files changed, 4 insertions, 0 deletions
diff --git a/application/controllers/file.php b/application/controllers/file.php index 438a47590..f2797e7e7 100644 --- a/application/controllers/file.php +++ b/application/controllers/file.php @@ -703,6 +703,7 @@ class File extends CI_Controller { { if (!$this->input->is_cli_request()) return; + // 0 age disables age checks if ($this->config->item('upload_max_age') == 0) return; $oldest_time = (time() - $this->config->item('upload_max_age')); diff --git a/application/models/mfile.php b/application/models/mfile.php index c56692c93..7d6056a9c 100644 --- a/application/models/mfile.php +++ b/application/models/mfile.php @@ -142,6 +142,9 @@ class Mfile extends CI_Model { return false; } + // 0 age disables age checks + if ($this->config->item('upload_max_age') == 0) return true; + // small files don't expire if (filesize($file) <= $this->config->item("small_upload_size")) { return true; |