mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
Make RSS feed work with objects that don't support AbsoluteLink, such as the forum
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.2.2@50914 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
9d902aa8cd
commit
3fa6d91992
@ -280,7 +280,9 @@ class RSSFeed_Entry extends ViewableData {
|
||||
* @return string Returns the URL of this entry
|
||||
*/
|
||||
function AbsoluteLink() {
|
||||
return $this->failover->AbsoluteLink();
|
||||
if($this->failover->hasMethod('AbsoluteLink')) return $this->failover->AbsoluteLink();
|
||||
else if($this->failover->hasMethod('Link')) return Director::absoluteURL($this->link);
|
||||
else user_error($this->failover->class . " object has either an AbsoluteLink nor a Link method. Can't put a link in the RSS feed", E_USER_WARNING);
|
||||
}
|
||||
}
|
||||
?>
|
Loading…
Reference in New Issue
Block a user