From 0df128e9803e23348c58a44ae6723f5e5192d13a Mon Sep 17 00:00:00 2001 From: Repellent Date: Sun, 18 Jan 2026 16:28:37 +0500 Subject: [PATCH] =?UTF-8?q?=D0=B8=D1=81=D0=BF=D1=80=D0=B0=D0=B2=D0=BB?= =?UTF-8?q?=D1=8F=D0=B5=D0=BC=20=D1=81=D1=81=D1=8B=D0=BB=D0=BA=D0=B8=20?= =?UTF-8?q?=D0=BD=D0=B0=20=D0=B4=D0=BE=D0=BA=D1=83=D0=BC=D0=B5=D0=BD=D1=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- class/comment.php | 15 ++++++++++++++- templates/admin_comments.tpl | 2 +- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/class/comment.php b/class/comment.php index 7db3b44..d548b96 100644 --- a/class/comment.php +++ b/class/comment.php @@ -1443,7 +1443,7 @@ function commentAdminListShow($tpl_dir) $start = get_current_page() * $limit - $limit; $sql = $AVE_DB->Query(" - SELECT cmnt.*, doc.document_title + SELECT cmnt.*, doc.document_title, doc.document_alias FROM " . PREFIX . "_module_comment_info AS cmnt LEFT JOIN " . PREFIX . "_documents AS doc ON doc.Id = cmnt.document_id ORDER BY cmnt.comment_published DESC @@ -1496,6 +1496,19 @@ function commentAdminListShow($tpl_dir) $row['rating_sum'] = (int)($row['rating_sum'] ?? 0); $row['r_count'] = (int)($row['rating_count'] ?? 0); $row['star_public'] = ($row['r_count'] > 0) ? round($row['rating_sum'] / $row['r_count']) : 0; + + $doc_id = (int)$row['document_id']; + $alias = (!empty($row['document_alias']) && $row['document_alias'] != '/') ? $row['document_alias'] : ''; + $raw_url = "index.php?id=" . $doc_id . "&doc=" . $alias . "/"; + + $final_url = function_exists('rewrite_link') ? rewrite_link($raw_url) : $alias; + $final_url = preg_replace('/(?
- + {$row.document_title|default:"Документ #`$row.document_id`"}