diff options
author | Andrew Dolgov <[email protected]> | 2017-06-05 10:28:59 +0300 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2017-06-05 10:28:59 +0300 |
commit | 1d61994776eb4275d41f9d797400ef951fdae15c (patch) | |
tree | 1b9bcf35f5959a9ef8d050a57db166cf44ef9c5f | |
parent | 2816d2cd4bf971faaf12be57d209d0feb21086a2 (diff) |
fix dilbert plugin not working because of changed GUIDs or w/e
-rw-r--r-- | plugins/af_comics/filters/af_comics_dilbert.php | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/plugins/af_comics/filters/af_comics_dilbert.php b/plugins/af_comics/filters/af_comics_dilbert.php index da5a44dea..565b44657 100644 --- a/plugins/af_comics/filters/af_comics_dilbert.php +++ b/plugins/af_comics/filters/af_comics_dilbert.php @@ -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 |