1
0
mirror of https://github.com/RSS-Bridge/rss-bridge.git synced 2025-08-13 20:14:10 +02:00

[core] extract BridgeAbstract methods to make them functions

- returnError, returnServerError, returnClientError ,debugMessage are
  moved to lib/error.php

- getContents, getSimpleHTMLDOM, getSimpleHTMLDOMCached are moved to
  lib/contents.php

Signed-off-by: Pierre Mazière <pierre.maziere@gmx.com>
This commit is contained in:
Pierre Mazière
2016-09-25 23:22:33 +02:00
parent ad534444fa
commit f1fb95b257
111 changed files with 485 additions and 477 deletions

View File

@@ -22,7 +22,7 @@ class WordPressBridge extends FeedExpander {
protected function parseItem($newItem){
$item=parent::parseItem($newItem);
$article_html = $this->getSimpleHTMLDOMCached($item['uri']);
$article_html = getSimpleHTMLDOMCached($item['uri']);
$article=null;
switch(true){
@@ -63,7 +63,7 @@ class WordPressBridge extends FeedExpander {
public function collectData(){
if($this->getInput('url') && substr($this->getInput('url'),0,strlen('http'))!=='http'){
// just in case someone find a way to access local files by playing with the url
$this->returnClientError('The url parameter must either refer to http or https protocol.');
returnClientError('The url parameter must either refer to http or https protocol.');
}
$this->collectExpandableDatas($this->getURI().'/feed/atom/');