]> git.wh0rd.org - tt-rss.git/commitdiff
fix dilbert plugin not working because of changed GUIDs or w/e
authorAndrew Dolgov <noreply@fakecake.org>
Mon, 5 Jun 2017 07:28:59 +0000 (10:28 +0300)
committerAndrew Dolgov <noreply@fakecake.org>
Mon, 5 Jun 2017 07:28:59 +0000 (10:28 +0300)
plugins/af_comics/filters/af_comics_dilbert.php

index da5a44deab8d163691775aec156a2b6484d95f68..565b44657c9c096d75889ccdda6a7ba4ed9e4ec0 100644 (file)
@@ -7,7 +7,7 @@ class Af_Comics_Dilbert extends Af_ComicFilter {
        }
 
        function process(&$article) {
-               if (strpos($article["guid"], "dilbert.com") !== FALSE ||
+               if (strpos($article["link"], "dilbert.com") !== FALSE ||
                        strpos($article["link"], "/DilbertDailyStrip") !== FALSE) {
 
                                $res = fetch_file_contents($article["link"], false, false, false,
@@ -20,11 +20,8 @@ class Af_Comics_Dilbert extends Af_ComicFilter {
                                        $res = $fetch_last_error_content;
 
                                $doc = new DOMDocument();
-                               @$doc->loadHTML($res);
 
-                               $basenode = false;
-
-                               if ($doc) {
+                               if (@$doc->loadHTML($res)) {
                                        $xpath = new DOMXPath($doc);
 
                                        // Get the image container