mirror of
https://github.com/silverstripe/silverstripe-blog
synced 2024-10-22 11:05:58 +02:00
Performed suggested changes
- Removed hardcoded URL segment (was test code that I forgot to remove) - Changed if($rss to if(is_string($rss) - Moved bracket after isRSS() to next line - Made rssFeed() protected as it's an internal function and shouldn't be part of the public API
This commit is contained in:
parent
073fca5f0d
commit
95e14e5496
@ -1104,9 +1104,9 @@ class Blog_Controller extends Page_Controller
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function rssFeed($blogPosts)
|
||||
protected function rssFeed($blogPosts)
|
||||
{
|
||||
$rss = new RSSFeed($blogPosts, $this->Link() . 'category/general/', $this->MetaTitle, $this->MetaDescription);
|
||||
$rss = new RSSFeed($blogPosts, $this->Link(), $this->MetaTitle, $this->MetaDescription);
|
||||
|
||||
$this->extend('updateRss', $rss);
|
||||
|
||||
@ -1116,9 +1116,10 @@ class Blog_Controller extends Page_Controller
|
||||
/**
|
||||
* Returns true if the $Rss sub-action for categories/tags has been set to "rss"
|
||||
*/
|
||||
private function isRSS() {
|
||||
private function isRSS()
|
||||
{
|
||||
$rss = $this->request->param('Rss');
|
||||
if($rss && strcasecmp($rss, "rss") == 0) {
|
||||
if(is_string($rss) && strcasecmp($rss, "rss") == 0) {
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
|
Loading…
Reference in New Issue
Block a user