diff options
| author | 2015-10-24 22:25:48 +0200 | |
|---|---|---|
| committer | 2015-10-24 22:25:48 +0200 | |
| commit | 481c2a671913cdd6099a1b6ee4d5491dff16c0bf (patch) | |
| tree | f4c281c112f15cfc14dc59850443ea222535d2c4 /app/Models/LogDAO.php | |
| parent | 52564957e6b25b4f127666da79d27eb99ca9bd5e (diff) | |
Clean logs
Reduced login of API and PubSubHubbub (both are quite stable now).
When clearing logs as admin, also clear API and PubSubHubbub logs.
https://github.com/FreshRSS/FreshRSS/issues/988
Diffstat (limited to 'app/Models/LogDAO.php')
| -rw-r--r-- | app/Models/LogDAO.php | 5 |
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'), ''); + } } } |
