From dbe7b454afc1df57ba705eead8da9f8021e13941 Mon Sep 17 00:00:00 2001 From: Repellent Date: Thu, 1 Jan 2026 16:54:13 +0500 Subject: [PATCH] =?UTF-8?q?fix=20=D0=B2=D1=8B=D0=B2=D0=BE=D0=B4=D0=B0=20?= =?UTF-8?q?=D0=B4=D0=B0=D1=82=D1=8B=20=D1=80=D0=B5=D0=B4=D0=B0=D0=BA=D1=82?= =?UTF-8?q?=D0=B8=D1=80=D0=BE=D0=B2=D0=B0=D0=BD=D0=B8=D1=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- class/comment.php | 13 ++++++++++--- templates/comments_tree_sub.tpl | 2 +- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/class/comment.php b/class/comment.php index 3f2b001..2d1e3a7 100644 --- a/class/comment.php +++ b/class/comment.php @@ -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; } diff --git a/templates/comments_tree_sub.tpl b/templates/comments_tree_sub.tpl index fc975bb..a7c3371 100644 --- a/templates/comments_tree_sub.tpl +++ b/templates/comments_tree_sub.tpl @@ -46,7 +46,7 @@ • IP:{$c.comment_author_ip} {/if} - {if isset($c.comment_changed) && $c.comment_changed > 1} + {if isset($c.comment_changed) && $c.comment_changed && $c.comment_changed != '0'} ред. {$c.comment_changed} {/if}