Merged revisions 50921 via svnmerge from

http://svn.silverstripe.com/open/modules/sapphire/branches/2.2.2

........
  r50921 | sminnee | 2008-03-12 12:49:44 +1300 (Wed, 12 Mar 2008) | 1 line
  
  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/trunk@51204 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
Sam Minnee 2008-03-17 08:24:08 +00:00
parent bd473aa749
commit d500a32098

View File

@ -281,7 +281,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);
}
}
?>