mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
FIX for #4909: Ensure RSSFeed_Entry is instantiated using the injector.
This commit is contained in:
parent
5f82e40fd4
commit
4bd66b9d36
@ -149,7 +149,7 @@ class RSSFeed extends ViewableData {
|
||||
if(isset($this->entries)) {
|
||||
foreach($this->entries as $entry) {
|
||||
$output->push(
|
||||
new RSSFeed_Entry($entry, $this->titleField, $this->descriptionField, $this->authorField));
|
||||
RSSFeed_Entry::create($entry, $this->titleField, $this->descriptionField, $this->authorField));
|
||||
}
|
||||
}
|
||||
return $output;
|
||||
@ -184,7 +184,11 @@ class RSSFeed extends ViewableData {
|
||||
}
|
||||
|
||||
/**
|
||||
* Output the feed to the browser
|
||||
* Output the feed to the browser.
|
||||
*
|
||||
* TODO: Pass $response object to ->outputToBrowser() to loosen dependence on global state for easier testing/prototyping so dev can inject custom SS_HTTPResponse instance.
|
||||
*
|
||||
* @return HTMLText
|
||||
*/
|
||||
public function outputToBrowser() {
|
||||
$prevState = Config::inst()->get('SSViewer', 'source_file_comments');
|
||||
|
Loading…
Reference in New Issue
Block a user