|
From: Kevin <ke...@dr...> - 2006-07-20 19:31:36
|
> So there seems to be some oddity that's cropped up in how a item link
> is being set from Atom feeds such as Feedburner.
fr_item.link is a field with two purposes. It holds a URL for the item,
but also holds a unique identifier for the item. The problem is, a singl=
e
value can't always fulfill both purposes simultaneously. Here is the
current logic to get the value for link. I know it needs to be changed t=
o
make it work better, but I don't know how.
in class FOF_RssItem (lib/model/rss.php)
function getLink()
{
if(isset($this->item['guid'])) {
$link =3D $this->item['guid'];
}
elseif (isset($this->item['link'])) {
$link =3D $this->item['link'];
}
elseif (isset($this->item['enclosure@url'])) {
$link =3D $this->item['enclosure@url'];
}
else {
// generate hash for item
$title =3D $this->getTitle();
$content =3D $this->getContent();
$hash =3D md5( $title . $content );
$link =3D sprintf('%s#%s',$this->feed_link, $hash);
}
return $link;
}
--=20
Kevin
|