]> git.wh0rd.org - tt-rss.git/commitdiff
plugins: remove obsolete plugin_data/stored stuff
authorAndrew Dolgov <noreply@fakecake.org>
Mon, 18 Aug 2014 14:41:19 +0000 (18:41 +0400)
committerAndrew Dolgov <noreply@fakecake.org>
Mon, 18 Aug 2014 14:41:19 +0000 (18:41 +0400)
14 files changed:
plugins/af_comics/filters/af_comics_cad.php
plugins/af_comics/filters/af_comics_comicpress.php
plugins/af_comics/filters/af_comics_darklegacy.php
plugins/af_comics/filters/af_comics_dilbert.php
plugins/af_comics/filters/af_comics_explosm.php
plugins/af_comics/filters/af_comics_gocomics.php
plugins/af_comics/filters/af_comics_pa.php
plugins/af_comics/filters/af_comics_twp.php
plugins/af_fsckportal/init.php
plugins/af_habr/init.php
plugins/af_natgeo/init.php
plugins/af_redditimgur/init.php
plugins/af_sciam/init.php
plugins/af_unburn/init.php

index fcc9078197360b3bc0efe5f14d98b279d0fe742f..43836724fb18a005a2abb6ee493e549bad85cc2c 100644 (file)
@@ -9,7 +9,7 @@ class Af_Comics_Cad extends Af_ComicFilter {
                $owner_uid = $article["owner_uid"];
 
                if (strpos($article["link"], "cad-comic.com/cad/") !== FALSE) {
-                       if (strpos($article["title"], "News:") === FALSE && strpos($article["plugin_data"], "af_comics,$owner_uid:") === FALSE) {
+                       if (strpos($article["title"], "News:") === FALSE) {
 
                                $doc = new DOMDocument();
                                @$doc->loadHTML(fetch_file_contents($article["link"]));
@@ -22,12 +22,9 @@ class Af_Comics_Cad extends Af_ComicFilter {
 
                                        if ($basenode) {
                                                $article["content"] = $doc->saveXML($basenode);
-                                               $article["plugin_data"] = "af_comics,$owner_uid:" . $article["plugin_data"];
                                        }
                                }
 
-                       } else if (isset($article["stored"]["content"])) {
-                               $article["content"] = $article["stored"]["content"];
                        }
 
                        return true;
index 5c4daa3374c44f51771ee021fc22ee21cf03183e..ec4b7ac57470f8cda6a8a174aa92b90d35d81882 100644 (file)
@@ -16,8 +16,6 @@ class Af_Comics_ComicPress extends Af_ComicFilter {
                                strpos($article["guid"], "happyjar.com") !== FALSE ||
                                strpos($article["guid"], "csectioncomics.com") !== FALSE) {
 
-                        if (strpos($article["plugin_data"], "af_comics,$owner_uid:") === FALSE) {
-
                                // lol at people who block clients by user agent
                                // oh noes my ad revenue Q_Q
 
@@ -36,12 +34,8 @@ class Af_Comics_ComicPress extends Af_ComicFilter {
 
                                        if ($basenode) {
                                                $article["content"] = $doc->saveXML($basenode);
-                                               $article["plugin_data"] = "af_comics,$owner_uid:" . $article["plugin_data"];
                                        }
                                }
-                       } else if (isset($article["stored"]["content"])) {
-                               $article["content"] = $article["stored"]["content"];
-                       }
 
                         return true;
                }
index d87a3da22a2dfa081b6cb987ce61ab925b3d9827..c03919b1d896e5a603ec7506345726d15cabe7e8 100644 (file)
@@ -9,9 +9,6 @@ class Af_Comics_DarkLegacy extends Af_ComicFilter {
                $owner_uid = $article["owner_uid"];
 
                if (strpos($article["guid"], "darklegacycomics.com") !== FALSE) {
-                        if (strpos($article["plugin_data"], "af_comics,$owner_uid:") === FALSE) {
-
-                                print "DLC!" . $article["link"] . "\n";
 
                                $res = fetch_file_contents($article["link"], false, false, false,
                                         false, false, 0,
@@ -34,12 +31,8 @@ class Af_Comics_DarkLegacy extends Af_ComicFilter {
                                        if ($basenode) {
 
                                                $article["content"] = $doc->saveXML($basenode);
-                                               $article["plugin_data"] = "af_comics,$owner_uid:" . $article["plugin_data"];
                                        }
                                }
-                       } else if (isset($article["stored"]["content"])) {
-                               $article["content"] = $article["stored"]["content"];
-                       }
 
                         return true;
                }
index 4c2233a3a7687e772e45997f90c8a3b12ff29544..f0e31cf889addedb7b5f6806febb51355599b53d 100644 (file)
@@ -9,7 +9,6 @@ class Af_Comics_Dilbert extends Af_ComicFilter {
                $owner_uid = $article["owner_uid"];
 
                if (strpos($article["guid"], "dilbert.com") !== FALSE) {
-                       if (strpos($article["plugin_data"], "af_comics,$owner_uid:") === FALSE) {
                                $doc = new DOMDocument();
                                @$doc->loadHTML(fetch_file_contents($article["link"]));
 
@@ -36,12 +35,8 @@ class Af_Comics_Dilbert extends Af_ComicFilter {
 
                                        if ($basenode) {
                                                $article["content"] = $doc->saveXML($basenode);
-                                               $article["plugin_data"] = "af_comics,$owner_uid:" . $article["plugin_data"];
                                        }
                                }
-                       } else if (isset($article["stored"]["content"])) {
-                               $article["content"] = $article["stored"]["content"];
-                       }
 
                        return true;
                }
index 7e0621852fb8251283f32c65910d617858879cb1..cba7ad0adec650e944976f7b7ab910bc0b17b6e6 100644 (file)
@@ -9,7 +9,6 @@ class Af_Comics_Explosm extends Af_ComicFilter {
                $owner_uid = $article["owner_uid"];
 
                if (strpos($article["link"], "explosm.net/comics") !== FALSE) {
-                       if (strpos($article["plugin_data"], "af_comics,$owner_uid:") === FALSE) {
 
                                $doc = new DOMDocument();
                                @$doc->loadHTML(fetch_file_contents($article["link"]));
@@ -33,12 +32,8 @@ class Af_Comics_Explosm extends Af_ComicFilter {
 
                                        if ($basenode) {
                                                $article["content"] = $doc->saveXML($basenode);
-                                               $article["plugin_data"] = "af_comics,$owner_uid:" . $article["plugin_data"];
                                        }
                                }
-                       } else if (isset($article["stored"]["content"])) {
-                               $article["content"] = $article["stored"]["content"];
-                       }
 
                        return true;
                }
index d950dbe6b60d8eb1bae0147980b629c652a4b12b..9b3c787de8791e1cd9f1a7185b5dca6d48cc313a 100644 (file)
@@ -9,7 +9,6 @@ class Af_Comics_GoComics extends Af_ComicFilter {
                $owner_uid = $article["owner_uid"];
 
                if (strpos($article["guid"], "gocomics.com") !== FALSE) {
-                       if (strpos($article["plugin_data"], "af_comics,$owner_uid:") === FALSE) {
                                $doc = new DOMDocument();
                                @$doc->loadHTML(fetch_file_contents($article["link"]));
 
@@ -42,12 +41,8 @@ class Af_Comics_GoComics extends Af_ComicFilter {
 
                                        if ($basenode) {
                                                $article["content"] = $doc->saveXML($basenode);
-                                               $article["plugin_data"] = "af_comics,$owner_uid:" . $article["plugin_data"];
                                        }
                                }
-                       } else if (isset($article["stored"]["content"])) {
-                               $article["content"] = $article["stored"]["content"];
-                       }
 
                        return true;
                }
index b44de9cff1b0ae553cd88c59b2ee2eb769b48039..a13857cc165933ad146e48cccc0190ce1b245607 100644 (file)
@@ -6,10 +6,7 @@ class Af_Comics_Pa extends Af_ComicFilter {
        }
 
        function process(&$article) {
-               $owner_uid = $article["owner_uid"];
-
                if (strpos($article["link"], "penny-arcade.com") !== FALSE && strpos($article["title"], "Comic:") !== FALSE) {
-                       if (strpos($article["plugin_data"], "af_comics,$owner_uid:") === FALSE) {
 
                                if ($debug_enabled) {
                                        _debug("af_pennyarcade: Processing comic");
@@ -26,18 +23,13 @@ class Af_Comics_Pa extends Af_ComicFilter {
 
                                        if ($basenode) {
                                                $article["content"] = $doc->saveXML($basenode);
-                                               $article["plugin_data"] = "af_comics,$owner_uid:" . $article["plugin_data"];
                                        }
                                }
-                       } else if (isset($article["stored"]["content"])) {
-                               $article["content"] = $article["stored"]["content"];
-                       }
 
                        return true;
                }
 
                if (strpos($article["link"], "penny-arcade.com") !== FALSE && strpos($article["title"], "News Post:") !== FALSE) {
-                       if (strpos($article["plugin_data"], "af_comics,$owner_uid:") === FALSE) {
                                if ($debug_enabled) {
                                        _debug("af_pennyarcade: Processing news post");
                                }
@@ -73,12 +65,8 @@ class Af_Comics_Pa extends Af_ComicFilter {
 
                                        if ($basenode){
                                                $article["content"] = $doc->saveXML($basenode);
-                                               $article["plugin_data"] = "af_comics,$owner_uid:" . $article["plugin_data"];
                                        }
                                }
-                       } else if (isset($article["stored"]["content"])) {
-                               $article["content"] = $article["stored"]["content"];
-                       }
 
                        return true;
                }
index 156b2b687bf519a2e9aaa21403c730e4ab15feed..ec43c1379d2e304a5965e234f2b7681a46ab85b9 100644 (file)
@@ -6,10 +6,8 @@ class Af_Comics_Twp extends Af_ComicFilter {
        }
 
        function process(&$article) {
-               $owner_uid = $article["owner_uid"];
 
                if (strpos($article["link"], "threewordphrase.com") !== FALSE) {
-                       if (strpos($article["plugin_data"], "af_comics,$owner_uid:") === FALSE) {
 
                                $doc = new DOMDocument();
                                @$doc->loadHTML(fetch_file_contents($article["link"]));
@@ -23,12 +21,8 @@ class Af_Comics_Twp extends Af_ComicFilter {
 
                                        if ($basenode) {
                                                $article["content"] = $doc->saveXML($basenode);
-                                               $article["plugin_data"] = "af_comics,$owner_uid:" . $article["plugin_data"];
                                        }
                                }
-                       } else if (isset($article["stored"]["content"])) {
-                               $article["content"] = $article["stored"]["content"];
-                       }
 
                        return true;
                }
index 4a5490274fe112b1beef00b3e4060fd3a7707fe5..4718eca913da3bb26feaafa05a52b5ede28afe92 100644 (file)
@@ -16,9 +16,6 @@ class Af_Fsckportal extends Plugin {
        }
 
        function hook_article_filter($article) {
-               $owner_uid = $article["owner_uid"];
-
-               if (strpos($article["plugin_data"], "fsckportal,$owner_uid:") === FALSE) {
 
                        $doc = new DOMDocument();
 
@@ -41,11 +38,7 @@ class Af_Fsckportal extends Plugin {
                                }
 
                                $article["content"] = $doc->saveXML();
-                               $article["plugin_data"] = "fsckportal,$owner_uid:" . $article["plugin_data"];
 
-                       }
-               } else if (isset($article["stored"]["content"])) {
-                       $article["content"] = $article["stored"]["content"];
                }
 
                return $article;
index d357956a717ecc0bd32bb7431a6d07c300b75e6c..e6dc54c24439ac692d265e8e9f3a1ac6b6d2d1d1 100644 (file)
@@ -17,7 +17,6 @@ class Af_Habr extends Plugin {
                $owner_uid = $article["owner_uid"];
 
                if (strpos($article["link"], "habrahabr.ru") !== FALSE) {
-                       if (strpos($article["plugin_data"], "af_habr,$owner_uid:") === FALSE) {
 
                                $doc = new DOMDocument();
                                @$doc->loadHTML(fetch_file_contents($article["link"]));
@@ -31,12 +30,8 @@ class Af_Habr extends Plugin {
 
                                        if ($basenode) {
                                                $article["content"] = $doc->saveXML($basenode);
-                                               $article["plugin_data"] = "af_habr,$owner_uid:" . $article["plugin_data"];
                                        }
                                }
-                       } else if (isset($article["stored"]["content"])) {
-                               $article["content"] = $article["stored"]["content"];
-                       }
                }
 
                return $article;
index 72354c1c88687a1109e910b1b5ed679fcd4061bc..52a89e92dfe5e5cf1f3619b23d01baacb7b49977 100644 (file)
@@ -19,7 +19,6 @@ class Af_NatGeo extends Plugin {
                $owner_uid = $article["owner_uid"];
 
                if (strpos($article["link"], "nationalgeographic.com") !== FALSE) {
-                       if (strpos($article["plugin_data"], "natgeo,$owner_uid:") === FALSE) {
 
                                $doc = new DOMDocument();
                                @$doc->loadHTML(fetch_file_contents($article["link"]));
@@ -39,12 +38,8 @@ class Af_NatGeo extends Plugin {
 
                                        if ($basenode) {
                                                $article["content"] = $doc->saveXML($basenode);
-                                               $article["plugin_data"] = "natgeo,$owner_uid:" . $article["plugin_data"];
                                        }
                                }
-                       } else if (isset($article["stored"]["content"])) {
-                               $article["content"] = $article["stored"]["content"];
-                       }
                }
 
                return $article;
index e81d908e2647114bd070793aee2f3c44e09448d3..e513cc6f4f2858d67f7e8edcad96a8474e5e51b8 100644 (file)
@@ -15,12 +15,8 @@ class Af_RedditImgur extends Plugin {
        }
 
        function hook_article_filter($article) {
-               $owner_uid = $article["owner_uid"];
-
-               $force = false;
 
                if (strpos($article["link"], "reddit.com/r/") !== FALSE) {
-                       if (strpos($article["plugin_data"], "redditimgur,$owner_uid:") === FALSE || $force) {
                                $doc = new DOMDocument();
                                @$doc->loadHTML($article["content"]);
 
@@ -123,12 +119,8 @@ class Af_RedditImgur extends Plugin {
 
                                        if ($node && $found) {
                                                $article["content"] = $doc->saveXML($node);
-                                               if (!$force) $article["plugin_data"] = "redditimgur,$owner_uid:" . $article["plugin_data"];
                                        }
                                }
-                       } else if (isset($article["stored"]["content"])) {
-                               $article["content"] = $article["stored"]["content"];
-                       }
                }
 
                return $article;
index 658265e507dfeca3c22fd6532ed2ee07cf3c9856..9c14515e0c1e4f7e60f030f79760d928f4c21744 100644 (file)
@@ -19,7 +19,6 @@ class Af_SciAm extends Plugin {
                $owner_uid = $article["owner_uid"];
 
                if (strpos($article["link"], "scientificamerican.com") !== FALSE || strpos($article["link"], "rss.sciam.com") !== FALSE) {
-                       if (strpos($article["plugin_data"], "sciam,$owner_uid:") === FALSE) {
 
                                $doc = new DOMDocument();
                                @$doc->loadHTML(fetch_file_contents($article["link"]));
@@ -33,12 +32,8 @@ class Af_SciAm extends Plugin {
 
                                        if ($basenode) {
                                                $article["content"] = $doc->saveXML($basenode);
-                                               $article["plugin_data"] = "sciam,$owner_uid:" . $article["plugin_data"];
                                        }
                                }
-                       } else if (isset($article["stored"]["content"])) {
-                               $article["content"] = $article["stored"]["content"];
-                       }
                }
 
                return $article;
index 5873ccdf75a5bcac6ed3698c66e652a174de9cf0..5c9bc138733efd1b999599e3dc73e5f6ed0822a9 100644 (file)
@@ -24,8 +24,6 @@ class Af_Unburn extends Plugin {
                                strpos($article["link"], "/~r/") !== FALSE ||
                                strpos($article["link"], "feedsportal.com") !== FALSE)) {
 
-                       if (strpos($article["plugin_data"], "unburn,$owner_uid:") === FALSE) {
-
                                if (ini_get("safe_mode") || ini_get("open_basedir")) {
                                        $ch = curl_init(geturl($article["link"]));
                                } else {
@@ -42,7 +40,7 @@ class Af_Unburn extends Plugin {
                                        curl_setopt($ch, CURLOPT_PROXY, _CURL_HTTP_PROXY);
                                }
 
-                               $contents = @curl_exec($ch);
+                               @curl_exec($ch);
 
                                $real_url = curl_getinfo($ch, CURLINFO_EFFECTIVE_URL);
 
@@ -73,9 +71,6 @@ class Af_Unburn extends Plugin {
                                        $article["plugin_data"] = "unburn,$owner_uid:" . $article["plugin_data"];
                                        $article["link"] = $real_url;
                                }
-                       } else if (isset($article["stored"]["link"])) {
-                               $article["link"] = $article["stored"]["link"];
-                       }
                }
 
                return $article;