1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-06 14:46:56 +02:00

sef-url for RSS news - category news #4868

CLOSES #4868
This commit is contained in:
Jimako
2022-09-09 12:42:43 +02:00
committed by GitHub
parent b95712578a
commit 39f46378f7

View File

@@ -97,7 +97,17 @@ class news_rss // plugin-folder + '_rss'
$rss[$i]['author'] = $value['user_name'];
$rss[$i]['author_email'] = $value['user_email'];
$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]['description'] = $this->getDescription($value);
@@ -193,4 +203,4 @@ class news_rss // plugin-folder + '_rss'
return $ret;
}
}
}