From c889d666b920818f816ebf65b04e79290e9acded Mon Sep 17 00:00:00 2001 From: Cameron Date: Thu, 3 Mar 2022 18:23:05 -0800 Subject: [PATCH] Use separate SEF value. --- e107_plugins/gsitemap/e_url.php | 2 +- e107_plugins/news/e_gsitemap.php | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/e107_plugins/gsitemap/e_url.php b/e107_plugins/gsitemap/e_url.php index 482ce8020..b08fbc3bf 100644 --- a/e107_plugins/gsitemap/e_url.php +++ b/e107_plugins/gsitemap/e_url.php @@ -48,7 +48,7 @@ class gsitemap_url // plugin-folder + '_url' { foreach($item as $data ) { - $key = $plug.'-'.$data['function']; // eg. news-latest + $key = $plug.'-'.$data['sef']; // eg. news-latest $config[$key] = array( 'alias' => $key, 'regex' => '^'.$key.'-sitemap\.xml$', // matched against url, and if true, redirected to 'redirect' below. diff --git a/e107_plugins/news/e_gsitemap.php b/e107_plugins/news/e_gsitemap.php index 821cf71a7..00ad7a845 100644 --- a/e107_plugins/news/e_gsitemap.php +++ b/e107_plugins/news/e_gsitemap.php @@ -29,7 +29,8 @@ class news_gsitemap // Viewable from my-website.com/news-latest-sitemap.xml ie. plugin-folder + function + 'sitemap.xml' $config[] = array( 'name' => "Latest News Posts", - 'function' => "latest", + 'function' => "latestPosts", + 'sef' => 'latest', // used in URL. eg. news-latest-sitemap.xml ); return $config; @@ -96,7 +97,7 @@ class news_gsitemap /* Custom Function for dynamic sitemap of news posts */ - function latest() + public function latestPosts() { $data = $this->getNewsPosts();