mirror of
https://github.com/RSS-Bridge/rss-bridge.git
synced 2025-08-23 00:23:10 +02:00
bridges: Replace returnError function with more specific
Replacements depend on original error code: 400: returnClientError 404: returnServerError 500: returnServerError 501: returnServerError
This commit is contained in:
@@ -7,7 +7,7 @@ class DauphineLibereBridge extends BridgeAbstract {
|
||||
$this->name = "Dauphine Bridge";
|
||||
$this->uri = "http://www.ledauphine.com/";
|
||||
$this->description = "Returns the newest articles.";
|
||||
$this->update = "2016-08-09";
|
||||
$this->update = '2016-08-17';
|
||||
|
||||
$this->parameters[] =
|
||||
'[
|
||||
@@ -102,10 +102,10 @@ class DauphineLibereBridge extends BridgeAbstract {
|
||||
|
||||
if (isset($param['u'])) { /* user timeline mode */
|
||||
$this->request = $param['u'];
|
||||
$html = $this->file_get_html('http://www.ledauphine.com/'.$this->request.'/rss', false, $context) or $this->returnError('Could not request DauphineLibere.', 404);
|
||||
$html = $this->file_get_html('http://www.ledauphine.com/'.$this->request.'/rss', false, $context) or $this->returnServerError('Could not request DauphineLibere.');
|
||||
}
|
||||
else {
|
||||
$html = $this->file_get_html('http://www.ledauphine.com/rss', false, $context) or $this->returnError('Could not request DauphineLibere.', 404);
|
||||
$html = $this->file_get_html('http://www.ledauphine.com/rss', false, $context) or $this->returnServerError('Could not request DauphineLibere.');
|
||||
}
|
||||
$limit = 0;
|
||||
|
||||
|
Reference in New Issue
Block a user