[WordPressBridge] allow other bridges to use it as a parent class

Signed-off-by: Pierre Mazière <pierre.maziere@gmx.com>
This commit is contained in:
Pierre Mazière 2016-09-15 12:35:52 +02:00
parent ca0842ccf8
commit b6245a90c8

View file

@ -51,11 +51,14 @@ class WordPressBridge extends FeedExpander {
public function getURI(){
$url = $this->getInput('url');
if(empty($url)){
$url = static::URI;
}
return $url;
}
public function collectData(){
if(substr($this->getInput('url'),0,strlen('http'))!=='http'){
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.');
}