1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-04 05:37:32 +02:00

Merge pull request #4870 from Jimmi08/patch-3

Fixes #4868 Sef-url for RSS news category
This commit is contained in:
Cameron
2022-09-29 12:15:41 -07:00
committed by GitHub

View File

@@ -97,7 +97,17 @@ class news_rss // plugin-folder + '_rss'
$rss[$i]['author'] = $value['user_name']; $rss[$i]['author'] = $value['user_name'];
$rss[$i]['author_email'] = $value['user_email']; $rss[$i]['author_email'] = $value['user_email'];
$rss[$i]['category_name'] = $tp->toHTML($value['category_name'],TRUE,'defs'); $rss[$i]['category_name'] = $tp->toHTML($value['category_name'],TRUE,'defs');
$rss[$i]['category_link'] = SITEURL."news.php?cat.".$value['news_category']; //TODO SEFURL. //category sef
if (empty($value['category_sef']))
{
$url = SITEURL . "news.php?cat." . $value['news_category'];
}
else
{
$category = array('id' => $value['news_category'], 'name' => $value['category_sef']);
$opts = array('full' => 1);
$url = e107::getUrl()->create('news/list/category', $category, $opts);
}
$rss[$i]['datestamp'] = $value['news_datestamp']; $rss[$i]['datestamp'] = $value['news_datestamp'];
$rss[$i]['description'] = $this->getDescription($value); $rss[$i]['description'] = $this->getDescription($value);
@@ -193,4 +203,4 @@ class news_rss // plugin-folder + '_rss'
return $ret; return $ret;
} }
} }