Skip to content

Commit

Permalink
Merge pull request #4870 from Jimmi08/patch-3
Browse files Browse the repository at this point in the history
Fixes #4868 Sef-url for RSS news category
  • Loading branch information
CaMer0n authored Sep 29, 2022
2 parents 43153ab + 39f4637 commit 1985dcf
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions e107_plugins/news/e_rss.php
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,17 @@ function data($parms=null)
$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);

Expand Down Expand Up @@ -193,4 +203,4 @@ function getMedia($row)
return $ret;

}
}
}

0 comments on commit 1985dcf

Please sign in to comment.