Skip to content

Commit

Permalink
Change column order
Browse files Browse the repository at this point in the history
Signed-off-by: Vitor Mattos <[email protected]>
  • Loading branch information
vitormattos committed Oct 30, 2023
1 parent fcba1ad commit a449a4f
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions lib/Datasource/AdminAudit.php
Original file line number Diff line number Diff line change
Expand Up @@ -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: "(?<file>.*)"/', $json['message'], $matches);
$data[] = [
$json['user'],
$json['time'],
$matches['file'],
$json['user'],
$json['remoteAddr'],
$json['userAgent'],
$i,
Expand All @@ -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.
Expand Down

0 comments on commit a449a4f

Please sign in to comment.