mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 12:05:37 +00:00
BUGFIX #6096 RSSFeed::feedContent() restores previous state of SSViewer::get_source_file_comments() after temporarily disabling it (thanks paradigmincarnate!)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@111914 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
f410e092d4
commit
03f107ef35
@ -193,11 +193,19 @@ class RSSFeed extends ViewableData {
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the content of the RSS feed
|
||||
* Return the content of the RSS feed.
|
||||
*
|
||||
* Also temporarily disabled source file comments, and restores
|
||||
* to previous state once content has been rendered.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
function feedContent() {
|
||||
$prevState = SSViewer::get_source_file_comments();
|
||||
SSViewer::set_source_file_comments(false);
|
||||
return str_replace(' ', ' ', $this->renderWith('RSSFeed'));
|
||||
$content = str_replace(' ', ' ', $this->renderWith('RSSFeed'));
|
||||
SSViewer::set_source_file_comments($prevState);
|
||||
return $content;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user