summaryrefslogtreecommitdiffstats
path: root/application/controllers
diff options
context:
space:
mode:
authorFlorian Pritz <bluewind@xinu.at>2012-09-11 15:41:51 +0200
committerFlorian Pritz <bluewind@xinu.at>2012-09-11 15:41:51 +0200
commit423adc78e9750d82af03bcaaa6561a2d7c6bd5ed (patch)
treecb2cff15951ccfbb6c5e8c39f8bd26682fb9b284 /application/controllers
parentfcdf76c9268b971b642f132a424368cef90b58aa (diff)
file/cron: always remove stale files
Signed-off-by: Florian Pritz <bluewind@xinu.at>
Diffstat (limited to 'application/controllers')
-rw-r--r--application/controllers/file.php3
1 files changed, 3 insertions, 0 deletions
diff --git a/application/controllers/file.php b/application/controllers/file.php
index 7c5918e07..c2af86fe9 100644
--- a/application/controllers/file.php
+++ b/application/controllers/file.php
@@ -593,6 +593,9 @@ class File extends CI_Controller {
$this->db->query('DELETE FROM files WHERE hash = ?', array($row['hash']));
} else {
$this->db->query('DELETE FROM files WHERE id = ? LIMIT 1', array($row['id']));
+ if ($this->mfile->stale_hash($row["hash"])) {
+ unlink($file);
+ }
}
}
}