1
0
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:
logmanoriginal
2016-08-17 14:45:08 +02:00
parent 73a1bcf3d6
commit 74f0572d91
124 changed files with 401 additions and 400 deletions

View File

@@ -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);