forked from blallo/rss-bridge
[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:
parent
ca0842ccf8
commit
b6245a90c8
1 changed files with 4 additions and 1 deletions
|
@ -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.');
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue