]> git.wh0rd.org Git - tt-rss.git/commitdiff
Reverts most of be60340. Implements a simplier solution using XPath to get the proper...
authorzaikos <no-reply@zaikos.com>
Wed, 14 Jan 2015 21:13:39 +0000 (16:13 -0500)
committerzaikos <no-reply@zaikos.com>
Wed, 14 Jan 2015 21:13:39 +0000 (16:13 -0500)
classes/feeditem/rss.php

index 0e2b77ac7cb26e79cb384d893a49021e9efef858..7b4c4fb0c6775cc2bb7ed7d369340fec401e8f58 100644 (file)
@@ -51,14 +51,10 @@ class FeedItem_RSS extends FeedItem_Common {
        }
 
        function get_title() {
-               $titles = $this->elem->getElementsByTagName("title");
+               $title = $this->xpath->query("title", $this->elem)->item(0);
 
-               foreach ($titles as $title) {
-                       $nv = trim($title->nodeValue);
-
-                       if (!empty($nv)) {
-                               return $nv;
-                       }
+               if ($title) {
+                       return trim($title->nodeValue);
                }
        }