mirror of
https://github.com/RSS-Bridge/rss-bridge.git
synced 2025-08-20 23:31:37 +02:00
[core + bridges] add BridgeAbstract::$inputs and BridgeAbstract::getInput()
Inputs are not stored in BridgeAbstract::$parameters anymore to separate static data from dynamic data. The getInput method allows for more readable code. Also fix an "undefined index 'global'" notice Probability of breaking bridges: high ! Signed-off-by: Pierre Mazière <pierre.maziere@gmx.com>
This commit is contained in:
@@ -38,7 +38,6 @@ class DauphineLibereBridge extends BridgeAbstract {
|
||||
}
|
||||
|
||||
public function collectData(){
|
||||
$param=$this->parameters[$this->queriedContext];
|
||||
|
||||
// Simulate Mozilla user-agent to fix error 403 (Forbidden)
|
||||
$opts = array('http' =>
|
||||
@@ -50,8 +49,8 @@ class DauphineLibereBridge extends BridgeAbstract {
|
||||
|
||||
$context = stream_context_create($opts);
|
||||
|
||||
if (isset($param['u']['value'])) { /* user timeline mode */
|
||||
$this->request = $param['u']['value'];
|
||||
if (isset($this->getInput('u'))) { /* user timeline mode */
|
||||
$this->request = $this->getInput('u');
|
||||
$html = $this->getSimpleHTMLDOM('http://www.ledauphine.com/'.$this->request.'/rss',false,$context) or $this->returnServerError('Could not request DauphineLibere.');
|
||||
}
|
||||
else {
|
||||
|
Reference in New Issue
Block a user