1
0
Fork 0
forked from blallo/rss-bridge

Fix indentation and remove unnecessary lines

This commit is contained in:
logmanoriginal 2016-08-02 13:37:18 +02:00
parent 1e33b7c2ec
commit 01bdda5e19

View file

@ -1,15 +1,13 @@
<?php
class CADBridge extends BridgeAbstract{
public function loadMetadatas() {
$this->maintainer = "nyutag";
$this->name = "CAD Bridge";
$this->uri = "http://www.cad-comic.com/";
$this->description = "Returns the newest articles.";
$this->update = "2016-08-02";
}
function CADExtractContent($url) {
$html3 = $this->file_get_html($url);
$htmlpart = explode("/", $url);
@ -26,7 +24,6 @@ class CADBridge extends BridgeAbstract{
}
public function collectData(array $param){
function CADUrl($string) {
$html2 = explode("\"", $string);
$string = $html2[1];
@ -35,10 +32,9 @@ class CADBridge extends BridgeAbstract{
return $string;
}
$html = $this->file_get_html('http://cdn2.cad-comic.com/rss.xml') or $this->returnError('Could not request CAD.', 404);
$limit = 0;
foreach($html->find('item') as $element) {
if($limit < 5) {
$item = new \Item();
@ -52,7 +48,6 @@ class CADBridge extends BridgeAbstract{
}
}
}
}
public function getName(){
@ -65,6 +60,6 @@ class CADBridge extends BridgeAbstract{
public function getCacheDuration(){
return 3600*2; // 2 hours
// return 0;
}
}
?>