aboutsummaryrefslogtreecommitdiff
path: root/app/Controllers/indexController.php
diff options
context:
space:
mode:
authorGravatar Marien Fressinaud <dev@marienfressinaud.fr> 2014-10-09 16:15:43 +0200
committerGravatar Marien Fressinaud <dev@marienfressinaud.fr> 2014-10-09 16:15:43 +0200
commit52173d71215733b9b94c7e6ae02dc84151d94d0a (patch)
treeabfa449b0ac4d448a9bb0e91b79b4e23de1b0d54 /app/Controllers/indexController.php
parent444b1552364b39761c3278c7da5152fd3998f216 (diff)
parentcaf98a6468dcea5ae8c38062e4eb527cb3667db9 (diff)
Merge branch 'hotfixes'
Diffstat (limited to 'app/Controllers/indexController.php')
-rwxr-xr-xapp/Controllers/indexController.php3
1 files changed, 2 insertions, 1 deletions
diff --git a/app/Controllers/indexController.php b/app/Controllers/indexController.php
index e8e26b142..d3b299f4e 100755
--- a/app/Controllers/indexController.php
+++ b/app/Controllers/indexController.php
@@ -330,7 +330,8 @@ class FreshRSS_index_Controller extends Minz_ActionController {
private static function purgeTokens() {
$oldest = time() - 2629744; //1 month //TODO: Use a configuration instead
foreach (new DirectoryIterator(DATA_PATH . '/tokens/') as $fileInfo) {
- if ($fileInfo->getExtension() === 'txt' && $fileInfo->getMTime() < $oldest) {
+ $extension = pathinfo($fileInfo->getFilename(), PATHINFO_EXTENSION);
+ if ($extension === 'txt' && $fileInfo->getMTime() < $oldest) {
@unlink($fileInfo->getPathname());
}
}