mirror of
https://github.com/standardebooks/web.git
synced 2025-07-21 14:55:13 -04:00
Use HTTP code enums instead of ints
This commit is contained in:
parent
3f822b85c3
commit
3050ab7219
28 changed files with 56 additions and 56 deletions
|
@ -11,7 +11,7 @@ try{
|
|||
}
|
||||
}
|
||||
catch(\Exception){
|
||||
http_response_code(500);
|
||||
http_response_code(Enums\HttpCode::InternalServerError->value);
|
||||
include(WEB_ROOT . '/404.php');
|
||||
exit();
|
||||
}
|
||||
|
|
|
@ -98,10 +98,10 @@ try{
|
|||
}
|
||||
catch(Exceptions\LoginRequiredException){
|
||||
header('WWW-Authenticate: Basic realm="Enter your Patrons Circle email address and leave the password empty."');
|
||||
http_response_code(401);
|
||||
http_response_code(Enums\HttpCode::Unauthorized->value);
|
||||
}
|
||||
catch(Exceptions\InvalidPermissionsException){
|
||||
http_response_code(403);
|
||||
http_response_code(Enums\HttpCode::Forbidden->value);
|
||||
}
|
||||
catch(Exceptions\InvalidFileException){
|
||||
Template::Emit404();
|
||||
|
|
|
@ -11,7 +11,7 @@ try{
|
|||
}
|
||||
}
|
||||
catch(\Exception){
|
||||
http_response_code(500);
|
||||
http_response_code(Enums\HttpCode::InternalServerError->value);
|
||||
exit();
|
||||
}
|
||||
print("<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<?xml-stylesheet href=\"". SITE_URL . "/feeds/opds/style\" type=\"text/xsl\"?>\n");
|
||||
|
|
|
@ -11,7 +11,7 @@ try{
|
|||
}
|
||||
}
|
||||
catch(\Exception){
|
||||
http_response_code(500);
|
||||
http_response_code(Enums\HttpCode::InternalServerError->value);
|
||||
include(WEB_ROOT . '/404.php');
|
||||
exit();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue