@@ -14,7 +14,7 @@ |
||
14 | 14 | } |
15 | 15 | |
16 | 16 | public function get_js() { |
17 | - return file_get_contents(__DIR__ . "/init.js"); |
|
17 | + return file_get_contents(__DIR__."/init.js"); |
|
18 | 18 | } |
19 | 19 | |
20 | 20 | public function api_version() { |
@@ -1,24 +1,24 @@ |
||
1 | 1 | <?php |
2 | 2 | class No_URL_Hashes extends Plugin { |
3 | - private $host; |
|
3 | + private $host; |
|
4 | 4 | |
5 | - public function about() { |
|
6 | - return array(1.0, |
|
7 | - "Disable URL hash usage (e.g. #f=10, etc)", |
|
8 | - "fox"); |
|
9 | - } |
|
5 | + public function about() { |
|
6 | + return array(1.0, |
|
7 | + "Disable URL hash usage (e.g. #f=10, etc)", |
|
8 | + "fox"); |
|
9 | + } |
|
10 | 10 | |
11 | - public function init($host) { |
|
12 | - $this->host = $host; |
|
11 | + public function init($host) { |
|
12 | + $this->host = $host; |
|
13 | 13 | |
14 | - } |
|
14 | + } |
|
15 | 15 | |
16 | - public function get_js() { |
|
17 | - return file_get_contents(__DIR__ . "/init.js"); |
|
18 | - } |
|
16 | + public function get_js() { |
|
17 | + return file_get_contents(__DIR__ . "/init.js"); |
|
18 | + } |
|
19 | 19 | |
20 | - public function api_version() { |
|
21 | - return 2; |
|
22 | - } |
|
20 | + public function api_version() { |
|
21 | + return 2; |
|
22 | + } |
|
23 | 23 | |
24 | 24 | } |
@@ -14,7 +14,7 @@ |
||
14 | 14 | } |
15 | 15 | |
16 | 16 | public function get_js() { |
17 | - return file_get_contents(__DIR__ . "/init.js"); |
|
17 | + return file_get_contents(__DIR__."/init.js"); |
|
18 | 18 | } |
19 | 19 | |
20 | 20 | public function api_version() { |
@@ -1,23 +1,23 @@ |
||
1 | 1 | <?php |
2 | 2 | class Af_Zz_NoAutoPlay extends Plugin { |
3 | - private $host; |
|
3 | + private $host; |
|
4 | 4 | |
5 | - public function about() { |
|
6 | - return array(1.0, |
|
7 | - "Don't autoplay HTML5 videos", |
|
8 | - "fox"); |
|
9 | - } |
|
5 | + public function about() { |
|
6 | + return array(1.0, |
|
7 | + "Don't autoplay HTML5 videos", |
|
8 | + "fox"); |
|
9 | + } |
|
10 | 10 | |
11 | - public function init($host) { |
|
12 | - $this->host = $host; |
|
13 | - } |
|
11 | + public function init($host) { |
|
12 | + $this->host = $host; |
|
13 | + } |
|
14 | 14 | |
15 | - public function get_js() { |
|
16 | - return file_get_contents(__DIR__ . "/init.js"); |
|
17 | - } |
|
15 | + public function get_js() { |
|
16 | + return file_get_contents(__DIR__ . "/init.js"); |
|
17 | + } |
|
18 | 18 | |
19 | - public function api_version() { |
|
20 | - return 2; |
|
21 | - } |
|
19 | + public function api_version() { |
|
20 | + return 2; |
|
21 | + } |
|
22 | 22 | |
23 | 23 | } |
@@ -92,7 +92,7 @@ |
||
92 | 92 | class="input input-text" |
93 | 93 | value="<?php echo $_SESSION["fake_password"] ?>"/> |
94 | 94 | </fieldset> |
95 | - <?php if (strpos(PLUGINS, "auth_internal") !== FALSE) { ?> |
|
95 | + <?php if (strpos(PLUGINS, "auth_internal") !== false) { ?> |
|
96 | 96 | <fieldset class="align-right"> |
97 | 97 | <a href="public.php?op=forgotpass"><?php echo __("I forgot my password") ?></a> |
98 | 98 | </fieldset> |
@@ -7,15 +7,15 @@ |
||
7 | 7 | <link rel="shortcut icon" type="image/png" href="images/favicon.png"> |
8 | 8 | <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> |
9 | 9 | <?php |
10 | - foreach (array("lib/prototype.js", |
|
11 | - "lib/dojo/dojo.js", |
|
12 | - "lib/dojo/tt-rss-layer.js", |
|
13 | - "js/common.js", |
|
14 | - "errors.php?mode=js") as $jsfile) { |
|
10 | + foreach (array("lib/prototype.js", |
|
11 | + "lib/dojo/dojo.js", |
|
12 | + "lib/dojo/tt-rss-layer.js", |
|
13 | + "js/common.js", |
|
14 | + "errors.php?mode=js") as $jsfile) { |
|
15 | 15 | |
16 | - echo javascript_tag($jsfile); |
|
16 | + echo javascript_tag($jsfile); |
|
17 | 17 | |
18 | - } ?> |
|
18 | + } ?> |
|
19 | 19 | |
20 | 20 | <script type="text/javascript"> |
21 | 21 | require({cache:{}}); |
@@ -6,7 +6,7 @@ |
||
6 | 6 | } |
7 | 7 | |
8 | 8 | public function process(&$article) { |
9 | - if (strpos($article["guid"], "loadingartist.com") !== FALSE) { |
|
9 | + if (strpos($article["guid"], "loadingartist.com") !== false) { |
|
10 | 10 | |
11 | 11 | // lol at people who block clients by user agent |
12 | 12 | // oh noes my ad revenue Q_Q |
@@ -1,34 +1,34 @@ |
||
1 | 1 | <?php |
2 | 2 | class Af_Comics_ComicClass extends Af_ComicFilter { |
3 | 3 | |
4 | - public function supported() { |
|
5 | - return array("Loading Artist"); |
|
6 | - } |
|
4 | + public function supported() { |
|
5 | + return array("Loading Artist"); |
|
6 | + } |
|
7 | 7 | |
8 | - public function process(&$article) { |
|
9 | - if (strpos($article["guid"], "loadingartist.com") !== FALSE) { |
|
8 | + public function process(&$article) { |
|
9 | + if (strpos($article["guid"], "loadingartist.com") !== FALSE) { |
|
10 | 10 | |
11 | - // lol at people who block clients by user agent |
|
12 | - // oh noes my ad revenue Q_Q |
|
11 | + // lol at people who block clients by user agent |
|
12 | + // oh noes my ad revenue Q_Q |
|
13 | 13 | |
14 | - $res = fetch_file_contents($article["link"], false, false, false, |
|
15 | - false, false, 0, |
|
16 | - "Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.1; WOW64; Trident/6.0)"); |
|
14 | + $res = fetch_file_contents($article["link"], false, false, false, |
|
15 | + false, false, 0, |
|
16 | + "Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.1; WOW64; Trident/6.0)"); |
|
17 | 17 | |
18 | - $doc = new DOMDocument(); |
|
18 | + $doc = new DOMDocument(); |
|
19 | 19 | |
20 | - if (@$doc->loadHTML($res)) { |
|
21 | - $xpath = new DOMXPath($doc); |
|
22 | - $basenode = $xpath->query('//div[@class="comic"]')->item(0); |
|
20 | + if (@$doc->loadHTML($res)) { |
|
21 | + $xpath = new DOMXPath($doc); |
|
22 | + $basenode = $xpath->query('//div[@class="comic"]')->item(0); |
|
23 | 23 | |
24 | - if ($basenode) { |
|
25 | - $article["content"] = $doc->saveHTML($basenode); |
|
26 | - } |
|
27 | - } |
|
24 | + if ($basenode) { |
|
25 | + $article["content"] = $doc->saveHTML($basenode); |
|
26 | + } |
|
27 | + } |
|
28 | 28 | |
29 | - return true; |
|
30 | - } |
|
29 | + return true; |
|
30 | + } |
|
31 | 31 | |
32 | - return false; |
|
33 | - } |
|
32 | + return false; |
|
33 | + } |
|
34 | 34 | } |
@@ -7,13 +7,13 @@ |
||
7 | 7 | } |
8 | 8 | |
9 | 9 | public function process(&$article) { |
10 | - if (strpos($article["guid"], "bunicomic.com") !== FALSE || |
|
11 | - strpos($article["guid"], "buttersafe.com") !== FALSE || |
|
12 | - strpos($article["guid"], "extrafabulouscomics.com") !== FALSE || |
|
13 | - strpos($article["guid"], "happyjar.com") !== FALSE || |
|
14 | - strpos($article["guid"], "nedroid.com") !== FALSE || |
|
15 | - strpos($article["guid"], "stonetoss.com") !== FALSE || |
|
16 | - strpos($article["guid"], "csectioncomics.com") !== FALSE) { |
|
10 | + if (strpos($article["guid"], "bunicomic.com") !== false || |
|
11 | + strpos($article["guid"], "buttersafe.com") !== false || |
|
12 | + strpos($article["guid"], "extrafabulouscomics.com") !== false || |
|
13 | + strpos($article["guid"], "happyjar.com") !== false || |
|
14 | + strpos($article["guid"], "nedroid.com") !== false || |
|
15 | + strpos($article["guid"], "stonetoss.com") !== false || |
|
16 | + strpos($article["guid"], "csectioncomics.com") !== false) { |
|
17 | 17 | |
18 | 18 | // lol at people who block clients by user agent |
19 | 19 | // oh noes my ad revenue Q_Q |
@@ -1,64 +1,64 @@ |
||
1 | 1 | <?php |
2 | 2 | class Af_Comics_ComicPress extends Af_ComicFilter { |
3 | 3 | |
4 | - public function supported() { |
|
5 | - return array("Buni", "Buttersafe", "Happy Jar", "CSection", |
|
6 | - "Extra Fabulous Comics", "Nedroid", "Stonetoss"); |
|
7 | - } |
|
4 | + public function supported() { |
|
5 | + return array("Buni", "Buttersafe", "Happy Jar", "CSection", |
|
6 | + "Extra Fabulous Comics", "Nedroid", "Stonetoss"); |
|
7 | + } |
|
8 | 8 | |
9 | - public function process(&$article) { |
|
10 | - if (strpos($article["guid"], "bunicomic.com") !== FALSE || |
|
11 | - strpos($article["guid"], "buttersafe.com") !== FALSE || |
|
12 | - strpos($article["guid"], "extrafabulouscomics.com") !== FALSE || |
|
13 | - strpos($article["guid"], "happyjar.com") !== FALSE || |
|
14 | - strpos($article["guid"], "nedroid.com") !== FALSE || |
|
15 | - strpos($article["guid"], "stonetoss.com") !== FALSE || |
|
16 | - strpos($article["guid"], "csectioncomics.com") !== FALSE) { |
|
9 | + public function process(&$article) { |
|
10 | + if (strpos($article["guid"], "bunicomic.com") !== FALSE || |
|
11 | + strpos($article["guid"], "buttersafe.com") !== FALSE || |
|
12 | + strpos($article["guid"], "extrafabulouscomics.com") !== FALSE || |
|
13 | + strpos($article["guid"], "happyjar.com") !== FALSE || |
|
14 | + strpos($article["guid"], "nedroid.com") !== FALSE || |
|
15 | + strpos($article["guid"], "stonetoss.com") !== FALSE || |
|
16 | + strpos($article["guid"], "csectioncomics.com") !== FALSE) { |
|
17 | 17 | |
18 | - // lol at people who block clients by user agent |
|
19 | - // oh noes my ad revenue Q_Q |
|
18 | + // lol at people who block clients by user agent |
|
19 | + // oh noes my ad revenue Q_Q |
|
20 | 20 | |
21 | - $res = fetch_file_contents(["url" => $article["link"], |
|
22 | - "useragent" => "Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.1; WOW64; Trident/6.0)"]); |
|
21 | + $res = fetch_file_contents(["url" => $article["link"], |
|
22 | + "useragent" => "Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.1; WOW64; Trident/6.0)"]); |
|
23 | 23 | |
24 | - $doc = new DOMDocument(); |
|
24 | + $doc = new DOMDocument(); |
|
25 | 25 | |
26 | - if (@$doc->loadHTML($res)) { |
|
27 | - $xpath = new DOMXPath($doc); |
|
28 | - $basenode = $xpath->query('//div[@id="comic"]')->item(0); |
|
26 | + if (@$doc->loadHTML($res)) { |
|
27 | + $xpath = new DOMXPath($doc); |
|
28 | + $basenode = $xpath->query('//div[@id="comic"]')->item(0); |
|
29 | 29 | |
30 | - if ($basenode) { |
|
31 | - $article["content"] = $doc->saveHTML($basenode); |
|
32 | - return true; |
|
33 | - } |
|
30 | + if ($basenode) { |
|
31 | + $article["content"] = $doc->saveHTML($basenode); |
|
32 | + return true; |
|
33 | + } |
|
34 | 34 | |
35 | - // buni-specific |
|
36 | - $webtoon_link = $xpath->query("//a[contains(@href,'www.webtoons.com')]")->item(0); |
|
35 | + // buni-specific |
|
36 | + $webtoon_link = $xpath->query("//a[contains(@href,'www.webtoons.com')]")->item(0); |
|
37 | 37 | |
38 | - if ($webtoon_link) { |
|
38 | + if ($webtoon_link) { |
|
39 | 39 | |
40 | - $res = fetch_file_contents(["url" => $webtoon_link->getAttribute("href"), |
|
41 | - "useragent" => "Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.1; WOW64; Trident/6.0)"]); |
|
40 | + $res = fetch_file_contents(["url" => $webtoon_link->getAttribute("href"), |
|
41 | + "useragent" => "Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.1; WOW64; Trident/6.0)"]); |
|
42 | 42 | |
43 | - if (@$doc->loadHTML($res)) { |
|
44 | - $xpath = new DOMXPath($doc); |
|
45 | - $basenode = $xpath->query('//div[@id="_viewerBox"]')->item(0); |
|
43 | + if (@$doc->loadHTML($res)) { |
|
44 | + $xpath = new DOMXPath($doc); |
|
45 | + $basenode = $xpath->query('//div[@id="_viewerBox"]')->item(0); |
|
46 | 46 | |
47 | - if ($basenode) { |
|
48 | - $imgs = $xpath->query("//img[@data-url]", $basenode); |
|
47 | + if ($basenode) { |
|
48 | + $imgs = $xpath->query("//img[@data-url]", $basenode); |
|
49 | 49 | |
50 | - foreach ($imgs as $img) { |
|
51 | - $img->setAttribute("src", $img->getAttribute("data-url")); |
|
52 | - } |
|
50 | + foreach ($imgs as $img) { |
|
51 | + $img->setAttribute("src", $img->getAttribute("data-url")); |
|
52 | + } |
|
53 | 53 | |
54 | - $article["content"] = $doc->saveHTML($basenode); |
|
55 | - return true; |
|
56 | - } |
|
57 | - } |
|
58 | - } |
|
59 | - } |
|
60 | - } |
|
54 | + $article["content"] = $doc->saveHTML($basenode); |
|
55 | + return true; |
|
56 | + } |
|
57 | + } |
|
58 | + } |
|
59 | + } |
|
60 | + } |
|
61 | 61 | |
62 | - return false; |
|
63 | - } |
|
62 | + return false; |
|
63 | + } |
|
64 | 64 | } |
@@ -7,7 +7,7 @@ |
||
7 | 7 | |
8 | 8 | public function process(&$article) { |
9 | 9 | |
10 | - if (strpos($article["link"], "explosm.net/comics") !== FALSE) { |
|
10 | + if (strpos($article["link"], "explosm.net/comics") !== false) { |
|
11 | 11 | |
12 | 12 | $doc = new DOMDocument(); |
13 | 13 |
@@ -1,28 +1,28 @@ |
||
1 | 1 | <?php |
2 | 2 | class Af_Comics_Explosm extends Af_ComicFilter { |
3 | 3 | |
4 | - public function supported() { |
|
5 | - return array("Cyanide and Happiness"); |
|
6 | - } |
|
4 | + public function supported() { |
|
5 | + return array("Cyanide and Happiness"); |
|
6 | + } |
|
7 | 7 | |
8 | - public function process(&$article) { |
|
8 | + public function process(&$article) { |
|
9 | 9 | |
10 | - if (strpos($article["link"], "explosm.net/comics") !== FALSE) { |
|
10 | + if (strpos($article["link"], "explosm.net/comics") !== FALSE) { |
|
11 | 11 | |
12 | - $doc = new DOMDocument(); |
|
12 | + $doc = new DOMDocument(); |
|
13 | 13 | |
14 | - if (@$doc->loadHTML(fetch_file_contents($article["link"]))) { |
|
15 | - $xpath = new DOMXPath($doc); |
|
16 | - $basenode = $xpath->query('(//img[@id="main-comic"])')->item(0); |
|
14 | + if (@$doc->loadHTML(fetch_file_contents($article["link"]))) { |
|
15 | + $xpath = new DOMXPath($doc); |
|
16 | + $basenode = $xpath->query('(//img[@id="main-comic"])')->item(0); |
|
17 | 17 | |
18 | - if ($basenode) { |
|
19 | - $article["content"] = $doc->saveHTML($basenode); |
|
20 | - } |
|
21 | - } |
|
18 | + if ($basenode) { |
|
19 | + $article["content"] = $doc->saveHTML($basenode); |
|
20 | + } |
|
21 | + } |
|
22 | 22 | |
23 | - return true; |
|
24 | - } |
|
23 | + return true; |
|
24 | + } |
|
25 | 25 | |
26 | - return false; |
|
27 | - } |
|
26 | + return false; |
|
27 | + } |
|
28 | 28 | } |
@@ -6,8 +6,8 @@ |
||
6 | 6 | } |
7 | 7 | |
8 | 8 | public function process(&$article) { |
9 | - if (strpos($article["link"], "toothpastefordinner.com") !== FALSE || |
|
10 | - strpos($article["link"], "marriedtothesea.com") !== FALSE) { |
|
9 | + if (strpos($article["link"], "toothpastefordinner.com") !== false || |
|
10 | + strpos($article["link"], "marriedtothesea.com") !== false) { |
|
11 | 11 | $res = fetch_file_contents($article["link"], false, false, false, |
12 | 12 | false, false, 0, |
13 | 13 | "Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.1; WOW64; Trident/6.0)"); |
@@ -1,32 +1,32 @@ |
||
1 | 1 | <?php |
2 | 2 | class Af_Comics_Tfd extends Af_ComicFilter { |
3 | 3 | |
4 | - public function supported() { |
|
5 | - return array("Toothpaste For Dinner", "Married to the Sea"); |
|
6 | - } |
|
4 | + public function supported() { |
|
5 | + return array("Toothpaste For Dinner", "Married to the Sea"); |
|
6 | + } |
|
7 | 7 | |
8 | - public function process(&$article) { |
|
9 | - if (strpos($article["link"], "toothpastefordinner.com") !== FALSE || |
|
10 | - strpos($article["link"], "marriedtothesea.com") !== FALSE) { |
|
11 | - $res = fetch_file_contents($article["link"], false, false, false, |
|
12 | - false, false, 0, |
|
13 | - "Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.1; WOW64; Trident/6.0)"); |
|
8 | + public function process(&$article) { |
|
9 | + if (strpos($article["link"], "toothpastefordinner.com") !== FALSE || |
|
10 | + strpos($article["link"], "marriedtothesea.com") !== FALSE) { |
|
11 | + $res = fetch_file_contents($article["link"], false, false, false, |
|
12 | + false, false, 0, |
|
13 | + "Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.1; WOW64; Trident/6.0)"); |
|
14 | 14 | |
15 | - if (!$res) return $article; |
|
15 | + if (!$res) return $article; |
|
16 | 16 | |
17 | - $doc = new DOMDocument(); |
|
17 | + $doc = new DOMDocument(); |
|
18 | 18 | |
19 | - if (@$doc->loadHTML(fetch_file_contents($article["link"]))) { |
|
20 | - $xpath = new DOMXPath($doc); |
|
21 | - $basenode = $xpath->query('//img[contains(@src, ".gif")]')->item(0); |
|
19 | + if (@$doc->loadHTML(fetch_file_contents($article["link"]))) { |
|
20 | + $xpath = new DOMXPath($doc); |
|
21 | + $basenode = $xpath->query('//img[contains(@src, ".gif")]')->item(0); |
|
22 | 22 | |
23 | - if ($basenode) { |
|
24 | - $article["content"] = $doc->saveHTML($basenode); |
|
25 | - return true; |
|
26 | - } |
|
27 | - } |
|
28 | - } |
|
23 | + if ($basenode) { |
|
24 | + $article["content"] = $doc->saveHTML($basenode); |
|
25 | + return true; |
|
26 | + } |
|
27 | + } |
|
28 | + } |
|
29 | 29 | |
30 | - return false; |
|
31 | - } |
|
30 | + return false; |
|
31 | + } |
|
32 | 32 | } |
@@ -12,7 +12,9 @@ |
||
12 | 12 | false, false, 0, |
13 | 13 | "Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.1; WOW64; Trident/6.0)"); |
14 | 14 | |
15 | - if (!$res) return $article; |
|
15 | + if (!$res) { |
|
16 | + return $article; |
|
17 | + } |
|
16 | 18 | |
17 | 19 | $doc = new DOMDocument(); |
18 | 20 |
@@ -7,7 +7,7 @@ |
||
7 | 7 | |
8 | 8 | public function process(&$article) { |
9 | 9 | |
10 | - if (strpos($article["link"], "threewordphrase.com") !== FALSE) { |
|
10 | + if (strpos($article["link"], "threewordphrase.com") !== false) { |
|
11 | 11 | |
12 | 12 | $doc = new DOMDocument(); |
13 | 13 |
@@ -1,29 +1,29 @@ |
||
1 | 1 | <?php |
2 | 2 | class Af_Comics_Twp extends Af_ComicFilter { |
3 | 3 | |
4 | - public function supported() { |
|
5 | - return array("Three Word Phrase"); |
|
6 | - } |
|
4 | + public function supported() { |
|
5 | + return array("Three Word Phrase"); |
|
6 | + } |
|
7 | 7 | |
8 | - public function process(&$article) { |
|
8 | + public function process(&$article) { |
|
9 | 9 | |
10 | - if (strpos($article["link"], "threewordphrase.com") !== FALSE) { |
|
10 | + if (strpos($article["link"], "threewordphrase.com") !== FALSE) { |
|
11 | 11 | |
12 | - $doc = new DOMDocument(); |
|
12 | + $doc = new DOMDocument(); |
|
13 | 13 | |
14 | - if (@$doc->loadHTML(fetch_file_contents($article["link"]))) { |
|
15 | - $xpath = new DOMXpath($doc); |
|
14 | + if (@$doc->loadHTML(fetch_file_contents($article["link"]))) { |
|
15 | + $xpath = new DOMXpath($doc); |
|
16 | 16 | |
17 | - $basenode = $xpath->query("//td/center/img")->item(0); |
|
17 | + $basenode = $xpath->query("//td/center/img")->item(0); |
|
18 | 18 | |
19 | - if ($basenode) { |
|
20 | - $article["content"] = $doc->saveHTML($basenode); |
|
21 | - } |
|
22 | - } |
|
19 | + if ($basenode) { |
|
20 | + $article["content"] = $doc->saveHTML($basenode); |
|
21 | + } |
|
22 | + } |
|
23 | 23 | |
24 | - return true; |
|
25 | - } |
|
24 | + return true; |
|
25 | + } |
|
26 | 26 | |
27 | - return false; |
|
28 | - } |
|
27 | + return false; |
|
28 | + } |
|
29 | 29 | } |
@@ -6,7 +6,7 @@ |
||
6 | 6 | } |
7 | 7 | |
8 | 8 | public function process(&$article) { |
9 | - if (strpos($article["guid"], "pvponline.com") !== FALSE) { |
|
9 | + if (strpos($article["guid"], "pvponline.com") !== false) { |
|
10 | 10 | |
11 | 11 | $res = fetch_file_contents($article["link"], false, false, false, |
12 | 12 | false, false, 0, |
@@ -1,31 +1,31 @@ |
||
1 | 1 | <?php |
2 | 2 | class Af_Comics_Pvp extends Af_ComicFilter { |
3 | 3 | |
4 | - public function supported() { |
|
5 | - return array("PvP Online"); |
|
6 | - } |
|
4 | + public function supported() { |
|
5 | + return array("PvP Online"); |
|
6 | + } |
|
7 | 7 | |
8 | - public function process(&$article) { |
|
9 | - if (strpos($article["guid"], "pvponline.com") !== FALSE) { |
|
8 | + public function process(&$article) { |
|
9 | + if (strpos($article["guid"], "pvponline.com") !== FALSE) { |
|
10 | 10 | |
11 | - $res = fetch_file_contents($article["link"], false, false, false, |
|
12 | - false, false, 0, |
|
13 | - "Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.1; WOW64; Trident/6.0)"); |
|
11 | + $res = fetch_file_contents($article["link"], false, false, false, |
|
12 | + false, false, 0, |
|
13 | + "Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.1; WOW64; Trident/6.0)"); |
|
14 | 14 | |
15 | - $doc = new DOMDocument(); |
|
15 | + $doc = new DOMDocument(); |
|
16 | 16 | |
17 | - if (@$doc->loadHTML($res)) { |
|
18 | - $xpath = new DOMXPath($doc); |
|
19 | - $basenode = $xpath->query('//section[@class="comic-art"]')->item(0); |
|
17 | + if (@$doc->loadHTML($res)) { |
|
18 | + $xpath = new DOMXPath($doc); |
|
19 | + $basenode = $xpath->query('//section[@class="comic-art"]')->item(0); |
|
20 | 20 | |
21 | - if ($basenode) { |
|
22 | - $article["content"] = $doc->saveHTML($basenode); |
|
23 | - } |
|
24 | - } |
|
21 | + if ($basenode) { |
|
22 | + $article["content"] = $doc->saveHTML($basenode); |
|
23 | + } |
|
24 | + } |
|
25 | 25 | |
26 | - return true; |
|
27 | - } |
|
26 | + return true; |
|
27 | + } |
|
28 | 28 | |
29 | - return false; |
|
30 | - } |
|
29 | + return false; |
|
30 | + } |
|
31 | 31 | } |