mirror of
https://github.com/RSS-Bridge/rss-bridge.git
synced 2025-08-28 02:19:55 +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:
@@ -8,7 +8,7 @@ class MangareaderBridge extends BridgeAbstract{
|
||||
$this->name = "Mangareader Bridge";
|
||||
$this->uri = "http://www.mangareader.net";
|
||||
$this->description = "Returns the latest updates, popular mangas or manga updates (new chapters)";
|
||||
$this->update = "2016-08-15";
|
||||
$this->update = '2016-08-17';
|
||||
|
||||
$this->parameters["Get latest updates"] = '[]';
|
||||
$this->parameters["Get popular mangas"] =
|
||||
@@ -225,7 +225,7 @@ class MangareaderBridge extends BridgeAbstract{
|
||||
// We'll use the DOM parser for this as it makes navigation easier
|
||||
$html = file_get_contents("http://www.mangareader.net/" . $path);
|
||||
if(!$html){
|
||||
$this->returnError('Could not receive data for ' . $path . '!', 400);
|
||||
$this->returnClientError('Could not receive data for ' . $path . '!');
|
||||
}
|
||||
$doc = new DomDocument;
|
||||
@$doc->loadHTML($html);
|
||||
|
Reference in New Issue
Block a user