diff options
Diffstat (limited to 'system/application/models')
-rw-r--r-- | system/application/models/file_mod.php | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/system/application/models/file_mod.php b/system/application/models/file_mod.php index a41e04b1a..2d3fc8ccf 100644 --- a/system/application/models/file_mod.php +++ b/system/application/models/file_mod.php @@ -50,7 +50,7 @@ class File_mod extends Model { function get_filedata($id) { $sql = ' - SELECT hash,filename,mimetype + SELECT hash,filename,mimetype, date FROM `files` WHERE `id` = ? LIMIT 1'; @@ -202,6 +202,11 @@ class File_mod extends Model { } else { $data['current_highlight'] = $this->mime2extension($type); } + if (filesize($file) > $this->config->item("small_upload_size")) { + $data['timeout'] = date("r", $filedata["date"]+$this->config->item("upload_max_age")); + } else { + $data['timeout'] = "never"; + } echo $this->load->view('file/html_header', $data, true); $this->load->library("MemcacheLibrary"); if (! $cached = $this->memcachelibrary->get($filedata['hash'].'_'.$mode)) { |