fix вывода даты редактирования

This commit is contained in:
2026-01-01 16:54:13 +05:00
parent c7627d699d
commit dbe7b454af
2 changed files with 11 additions and 4 deletions

View File

@@ -427,9 +427,16 @@ if ($settings['comment_use_page_nav'] == 1)
}
// --- КОНЕЦ НОВОГО ---
$row['comment_published_raw'] = $row['comment_published'];
$row['comment_published'] = ave_date_format($date_time_format, $row['comment_published']);
$row['comment_changed'] = ave_date_format($date_time_format, $row['comment_changed']);
$row['comment_published_raw'] = $row['comment_published'];
$row['comment_published'] = ave_date_format($date_time_format, $row['comment_published']);
// Если время изменения больше 0, тогда форматируем.
// Иначе — ставим 0, чтобы шаблон не выводил плашку.
if ($row['comment_changed'] > 0) {
$row['comment_changed'] = ave_date_format($date_time_format, $row['comment_changed']);
} else {
$row['comment_changed'] = 0;
}
$comments[$row['parent_id']][] = $row;
}

View File

@@ -46,7 +46,7 @@
<span class="text-secondary d-none d-sm-inline">• IP:{$c.comment_author_ip}</span>
{/if}
{if isset($c.comment_changed) && $c.comment_changed > 1}
{if isset($c.comment_changed) && $c.comment_changed && $c.comment_changed != '0'}
<span class="badge bg-light text-secondary border fw-normal" id="changed_{$c.Id}">ред. {$c.comment_changed}</span>
{/if}
</div>