aboutsummaryrefslogtreecommitdiffhomepage
path: root/inc/poche/Poche.class.php
diff options
context:
space:
mode:
authorNicolas LÅ“uillet <nicolas.loeuillet@gmail.com>2014-02-14 15:11:57 +0100
committerNicolas LÅ“uillet <nicolas.loeuillet@gmail.com>2014-02-14 15:11:57 +0100
commit6285e57c49bd06ed52ab997f0dc767576b7da126 (patch)
tree402ffd66fcd32d2847bd2cf476c71b49bf373e2b /inc/poche/Poche.class.php
parent243e13ab598bd3c4c711b8070cfaa048a3243fa3 (diff)
downloadwallabag-6285e57c49bd06ed52ab997f0dc767576b7da126.tar.gz
wallabag-6285e57c49bd06ed52ab997f0dc767576b7da126.tar.zst
wallabag-6285e57c49bd06ed52ab997f0dc767576b7da126.zip
[add] link to empty cache in config screen, #454
Diffstat (limited to 'inc/poche/Poche.class.php')
-rw-r--r--inc/poche/Poche.class.php16
1 files changed, 16 insertions, 0 deletions
diff --git a/inc/poche/Poche.class.php b/inc/poche/Poche.class.php
index 5eba3564..d0e2de1f 100644
--- a/inc/poche/Poche.class.php
+++ b/inc/poche/Poche.class.php
@@ -1057,4 +1057,20 @@ class Poche
1057 $feed->genarateFeed(); 1057 $feed->genarateFeed();
1058 exit; 1058 exit;
1059 } 1059 }
1060
1061 public function emptyCache() {
1062 $files = new RecursiveIteratorIterator(
1063 new RecursiveDirectoryIterator(CACHE, RecursiveDirectoryIterator::SKIP_DOTS),
1064 RecursiveIteratorIterator::CHILD_FIRST
1065 );
1066
1067 foreach ($files as $fileinfo) {
1068 $todo = ($fileinfo->isDir() ? 'rmdir' : 'unlink');
1069 $todo($fileinfo->getRealPath());
1070 }
1071
1072 Tools::logm('empty cache');
1073 $this->messages->add('s', _('Cache deleted.'));
1074 Tools::redirect();
1075 }
1060} 1076}