aboutsummaryrefslogtreecommitdiff
path: root/app/Controllers/indexController.php
diff options
context:
space:
mode:
authorGravatar Marien Fressinaud <dev@marienfressinaud.fr> 2014-10-09 16:18:26 +0200
committerGravatar Marien Fressinaud <dev@marienfressinaud.fr> 2014-10-09 16:18:26 +0200
commit799bb6e0de68f5dddde53a6ea7178a518d16cbfa (patch)
treeb8b7b63edae7b9f7553a5df15f2c53c002b26fb5 /app/Controllers/indexController.php
parent6dfbc28042c6e18da9c7578ed626064a4d8c7cb3 (diff)
parentcaf98a6468dcea5ae8c38062e4eb527cb3667db9 (diff)
Merge branch 'hotfixes' into beta
Conflicts: CHANGELOG README.fr.md README.md constants.php
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());
}
}