From d4cbe77547aa29eb7d239b3cc5a705b03ab9d794 Mon Sep 17 00:00:00 2001 From: Roman Kelesidis Date: Wed, 20 Aug 2025 11:12:59 +0300 Subject: [PATCH] feat: Bring back support `seo_url` function in `Sitemap.php` --- src/Sitemap.php | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/Sitemap.php b/src/Sitemap.php index f3fc70538..c92f571f6 100644 --- a/src/Sitemap.php +++ b/src/Sitemap.php @@ -52,8 +52,12 @@ class Sitemap "); while ($row = DB()->sql_fetchrow($sql)) { + $forum_url = FORUM_URL . $row['forum_id']; + if (function_exists('seo_url')) { + $forum_url = seo_url(FORUM_URL . $row['forum_id'], $row['forum_name']); + }; $forumUrls[] = [ - 'url' => FORUM_URL . $row['forum_id'], + 'url' => $forum_url, 'time' => $row['last_topic_time'] ]; } @@ -83,8 +87,12 @@ class Sitemap $sql = DB()->sql_query("SELECT topic_id, topic_title, topic_last_post_time FROM " . BB_TOPICS . " " . $ignore_forum_sql . " ORDER BY topic_last_post_time ASC"); while ($row = DB()->sql_fetchrow($sql)) { + $topic_url = TOPIC_URL . $row['topic_id']; + if (function_exists('seo_url')) { + $topic_url = seo_url(TOPIC_URL . $row['topic_id'], $row['topic_title']); + }; $topicUrls[] = [ - 'url' => TOPIC_URL . $row['topic_id'], + 'url' => $topic_url, 'time' => $row['topic_last_post_time'], ]; }