aboutsummaryrefslogtreecommitdiff
path: root/app/Models/LogDAO.php
diff options
context:
space:
mode:
authorGravatar maTh <math-home@web.de> 2022-08-21 22:44:03 +0200
committerGravatar GitHub <noreply@github.com> 2022-08-21 22:44:03 +0200
commit4214954ea169e6cf6b9a7b2927dce892463c851c (patch)
tree2ef0a50dfe56343a51eaeb4864f3eee77d7d82d2 /app/Models/LogDAO.php
parent85991d1c5ca1b29503e11be65a33da9a7e0c154a (diff)
Improved: error page (#4465)
* error page: true HTML page * error page: http500 erorr * error page: add CSP header * 'log.txt' replaced by LOG_FILENAME * use ADMIN_LOG * log.txt => LOG_FILENAME * error message: add <title> * Docs created * delete: documentation on error message page * line break added * added: new line at the end * typo fixed * Update lib/lib_rss.php Co-authored-by: Alexandre Alapetite <alexandre@alapetite.fr> * Update lib/lib_rss.php Co-authored-by: Alexandre Alapetite <alexandre@alapetite.fr> * Minz HTTP 500 Co-authored-by: Alexandre Alapetite <alexandre@alapetite.fr>
Diffstat (limited to 'app/Models/LogDAO.php')
-rw-r--r--app/Models/LogDAO.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/app/Models/LogDAO.php b/app/Models/LogDAO.php
index 5bce466d5..787945af4 100644
--- a/app/Models/LogDAO.php
+++ b/app/Models/LogDAO.php
@@ -3,7 +3,7 @@
class FreshRSS_LogDAO {
public static function lines() {
$logs = array();
- $handle = @fopen(join_path(DATA_PATH, 'users', Minz_Session::param('currentUser', '_'), 'log.txt'), 'r');
+ $handle = @fopen(join_path(DATA_PATH, 'users', Minz_Session::param('currentUser', '_'), LOG_FILENAME), 'r');
if ($handle) {
while (($line = fgets($handle)) !== false) {
if (preg_match('/^\[([^\[]+)\] \[([^\[]+)\] --- (.*)$/', $line, $matches)) {
@@ -20,7 +20,7 @@ class FreshRSS_LogDAO {
}
public static function truncate() {
- file_put_contents(join_path(DATA_PATH, 'users', Minz_Session::param('currentUser', '_'), 'log.txt'), '');
+ file_put_contents(join_path(DATA_PATH, 'users', Minz_Session::param('currentUser', '_'), LOG_FILENAME), '');
if (FreshRSS_Auth::hasAccess('admin')) {
file_put_contents(ADMIN_LOG, '');
file_put_contents(API_LOG, '');