feat: Bring back support seo_url function in Sitemap.php (#2093)

This commit is contained in:
Roman Kelesidis 2025-08-20 11:13:51 +03:00 committed by GitHub
commit af9bf7382c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -52,8 +52,12 @@ class Sitemap
"); ");
while ($row = DB()->sql_fetchrow($sql)) { 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[] = [ $forumUrls[] = [
'url' => FORUM_URL . $row['forum_id'], 'url' => $forum_url,
'time' => $row['last_topic_time'] '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"); $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)) { 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[] = [ $topicUrls[] = [
'url' => TOPIC_URL . $row['topic_id'], 'url' => $topic_url,
'time' => $row['topic_last_post_time'], 'time' => $row['topic_last_post_time'],
]; ];
} }