mirror of
https://gitlab.archlinux.org/archlinux/aurweb.git
synced 2025-02-03 10:43:03 +01:00
Hide names of deleted accounts in comment headings
When the account of a user who edited/deleted a comment is removed, drop occurrences of his user name in comment headings instead of replacing the user name with "None". Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
This commit is contained in:
parent
51407d4a29
commit
4653945226
1 changed files with 12 additions and 7 deletions
|
@ -31,20 +31,25 @@ if (!isset($count)) {
|
|||
|
||||
if ($uid && $is_deleted) {
|
||||
$date_fmtd = gmdate('Y-m-d H:i', $row['DelTS']);
|
||||
$user_fmtd = html_format_username($row['DelUserName']);
|
||||
$heading .= ' <span class="edited">(';
|
||||
$heading .= __('deleted on %s by %s', $date_fmtd, $user_fmtd);
|
||||
if ($row['DelUserName']) {
|
||||
$user_fmtd = html_format_username($row['DelUserName']);
|
||||
$heading .= __('deleted on %s by %s', $date_fmtd, $user_fmtd);
|
||||
} else {
|
||||
$heading .= __('deleted on %s', $date_fmtd);
|
||||
}
|
||||
$heading .= ')</span>';
|
||||
} elseif ($uid && $is_edited) {
|
||||
$date_fmtd = gmdate('Y-m-d H:i', $row['EditedTS']);
|
||||
$user_fmtd = html_format_username($row['EditUserName']);
|
||||
$heading .= ' <span class="edited">(';
|
||||
$heading .= __('edited on %s by %s', $date_fmtd, $user_fmtd);
|
||||
if ($row['EditUserName']) {
|
||||
$user_fmtd = html_format_username($row['EditUserName']);
|
||||
$heading .= __('edited on %s by %s', $date_fmtd, $user_fmtd);
|
||||
} else {
|
||||
$heading .= __('edited on %s', $date_fmtd);
|
||||
}
|
||||
$heading .= ')</span>';
|
||||
}
|
||||
|
||||
$row['DelUserName'] = html_format_username($row['DelUserName']);
|
||||
$row['EditUserName'] = html_format_username($row['EditUserName']);
|
||||
?>
|
||||
<h4 id="comment-<?= $row['ID'] ?>"<?php if ($is_deleted): ?> class="comment-deleted"<?php endif; ?>>
|
||||
<?= $heading ?>
|
||||
|
|
Loading…
Add table
Reference in a new issue