summaryrefslogtreecommitdiff
path: root/app/Models
diff options
context:
space:
mode:
authorGravatar Marien Fressinaud <dev@marienfressinaud.fr> 2015-10-25 17:24:00 +0100
committerGravatar Marien Fressinaud <dev@marienfressinaud.fr> 2015-10-25 17:24:00 +0100
commitb8b0ba6f244b37f5b823f05b6ef00f4684b3d89b (patch)
tree358a16ff9b6acf6eb1f885a7ad201cec02a3f714 /app/Models
parentd73fdd3e24732f51c322a9dc6fe48c28c84b8357 (diff)
parent481c2a671913cdd6099a1b6ee4d5491dff16c0bf (diff)
Merge pull request #1010 from Alkarex/cleanLogs
Clean logs
Diffstat (limited to 'app/Models')
-rw-r--r--app/Models/LogDAO.php5
1 files changed, 5 insertions, 0 deletions
diff --git a/app/Models/LogDAO.php b/app/Models/LogDAO.php
index 4c56e3150..ab258cd58 100644
--- a/app/Models/LogDAO.php
+++ b/app/Models/LogDAO.php
@@ -21,5 +21,10 @@ class FreshRSS_LogDAO {
public static function truncate() {
file_put_contents(join_path(DATA_PATH, 'users', Minz_Session::param('currentUser', '_'), 'log.txt'), '');
+ if (FreshRSS_Auth::hasAccess('admin')) {
+ file_put_contents(join_path(DATA_PATH, 'users', '_', 'log.txt'), '');
+ file_put_contents(join_path(DATA_PATH, 'users', '_', 'log_api.txt'), '');
+ file_put_contents(join_path(DATA_PATH, 'users', '_', 'log_pshb.txt'), '');
+ }
}
}