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}