feat: Bring back support seo_url function in Sitemap.php

This commit is contained in:
Roman Kelesidis 2025-08-20 11:12:59 +03:00
commit d4cbe77547
No known key found for this signature in database
GPG key ID: D8157C4D4C4C6DB4

View file

@ -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'],
];
}