Commit ec1c873d authored by Cecilia Vela Gurovic's avatar Cecilia Vela Gurovic

Bug 1830811: rss feed class needs to fetch link from attributes

behatnotneeded

Change-Id: I533065c34a5f73bb4ec743ad7d5ef6c6ed20468d
parent 124fb788
......@@ -223,11 +223,16 @@ class FeedReader {
* = false if not exists
*/
public function get_item_link($i) {
return (isset($this->items[$i])
&& isset($this->items[$i]['LINK'])
&& isset($this->items[$i]['LINK']['VALUE'])) ?
$this->items[$i]['LINK']['VALUE']
: false;
if (isset($this->items[$i]) && isset($this->items[$i]['LINK'])) {
if (isset($this->items[$i]['LINK']['VALUE'])) {
return $this->items[$i]['LINK']['VALUE'];
}
if (isset($this->items[$i]['LINK']['ATTRIBUTES'])
&& isset($this->items[$i]['LINK']['ATTRIBUTES']['HREF'])) {
return $this->items[$i]['LINK']['ATTRIBUTES']['HREF'];
}
}
return false;
}
/**
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment