From a449a4f21e6fb55346ff57c48833b71db13248db Mon Sep 17 00:00:00 2001 From: Vitor Mattos Date: Sun, 29 Oct 2023 21:04:59 -0300 Subject: [PATCH] Change column order Signed-off-by: Vitor Mattos --- lib/Datasource/AdminAudit.php | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/lib/Datasource/AdminAudit.php b/lib/Datasource/AdminAudit.php index fd14f68..419136c 100644 --- a/lib/Datasource/AdminAudit.php +++ b/lib/Datasource/AdminAudit.php @@ -72,14 +72,17 @@ public function readData($option): array { $i = 1; while (($buffer = fgets($fp, 4096)) !== false) { $json = json_decode($buffer, true); + if (str_contains($json['message'], '.directory')) { + continue; + } if (!str_contains($json['message'], 'File accessed')) { continue; } preg_match('/File accessed: "(?.*)"/', $json['message'], $matches); $data[] = [ + $json['user'], $json['time'], $matches['file'], - $json['user'], $json['remoteAddr'], $json['userAgent'], $i, @@ -89,12 +92,12 @@ public function readData($option): array { fclose($fp); $header = [ + // TRANSLATORS Column name of report that list log entries of app Audit Report. This column will display the user that trigged the log. + $this->l10n->t('User'), // TRANSLATORS Column name of report that list log entries of app Audit Report. This column will display the date of log. $this->l10n->t('Date'), // TRANSLATORS Column name of report that list log entries of app Audit Report. This column will display the acessed file. $this->l10n->t('File'), - // TRANSLATORS Column name of report that list log entries of app Audit Report. This column will display the user that trigged the log. - $this->l10n->t('User'), // TRANSLATORS Column name of report that list log entries of app Audit Report. This column will display the IP of user that trigged the log. $this->l10n->t('IP'), // TRANSLATORS Column name of report that list log entries of app Audit Report. This column will display the user agent of user that trigged the log.