Skip to content
Permalink
Browse files Browse the repository at this point in the history
fix: added missing conversion to HTML entities
  • Loading branch information
thorsten committed Feb 16, 2023
1 parent 400d9cd commit e018823
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions phpmyfaq/admin/stat.adminlog.php
Expand Up @@ -35,7 +35,7 @@
$deleteLog = true;
}

if ($user->perm->hasPermission($user->getUserId(), 'adminlog') && 'adminlog' == $action) {
if ($user->perm->hasPermission($user->getUserId(), 'adminlog') && 'adminlog' === $action) {
$date = new Date($faqConfig);
$perpage = 15;
$pages = Filter::filterInput(INPUT_GET, 'pages', FILTER_VALIDATE_INT);
Expand Down Expand Up @@ -117,7 +117,7 @@
<td><?= Strings::htmlentities($user->getLogin()) ?></td>
<td><?= $loggingValue['ip'] ?></td>
<td><small><?php
$text = $loggingValue['text'];
$text = Strings::htmlentities($loggingValue['text']);
$text = str_replace('Loginerror', $PMF_LANG['ad_log_lger'], $text);
$text = str_replace('Session expired', $PMF_LANG['ad_log_sess'], $text);
$text = str_replace('Useredit, ', $PMF_LANG['ad_log_edit'], $text);
Expand All @@ -138,7 +138,7 @@
</table>

<?php
} elseif ($user->perm->hasPermission($user->getUserId(), 'adminlog') && 'deleteadminlog' == $action && $deleteLog) {
} elseif ($user->perm->hasPermission($user->getUserId(), 'adminlog') && 'deleteadminlog' === $action && $deleteLog) {
if ($logging->delete()) {
printf('<p class="alert alert-success">%s</p>', $PMF_LANG['ad_adminlog_delete_success']);
} else {
Expand Down

0 comments on commit e018823

Please sign in to comment.