Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
mahara
mahara
Commits
e662d5d9
Commit
e662d5d9
authored
Jul 09, 2009
by
Ben Bradshaw
Browse files
[#3195] Use XPath to find <link> elements (ignore atom:link)
(cherry picked from commit f454e903ae32f109d47d753c43375ec56b4950a7)
parent
e4f6b75f
Changes
1
Hide whitespace changes
Inline
Side-by-side
htdocs/lib/pear/XML/Feed/Parser/RSS2.php
View file @
e662d5d9
...
...
@@ -321,7 +321,8 @@ class XML_Feed_Parser_RSS2 extends XML_Feed_Parser_Type
*/
function
getLink
(
$offset
,
$attribute
=
'href'
,
$params
=
array
())
{
$links
=
$this
->
model
->
getElementsByTagName
(
'link'
);
$xPath
=
new
DOMXPath
(
$this
->
model
);
$links
=
$xPath
->
query
(
'//link'
);
if
(
$links
->
length
<=
$offset
)
{
return
false
;
...
...
@@ -331,4 +332,4 @@ class XML_Feed_Parser_RSS2 extends XML_Feed_Parser_Type
}
}
?>
\ No newline at end of file
?>
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment