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('/(?