mirror of
https://github.com/standardebooks/web.git
synced 2025-07-20 13:24:48 -04:00
Replace Template::Emit...() functions with more generic function
This commit is contained in:
parent
f449c024ea
commit
806939ca49
40 changed files with 86 additions and 68 deletions
|
@ -6,7 +6,7 @@ $canDownload = false;
|
|||
$class = HttpInput::Str(GET, 'class');
|
||||
|
||||
if($class === null || ($class != 'authors' && $class != 'collections' && $class != 'subjects' && $class != 'months')){
|
||||
Template::Emit404();
|
||||
Template::ExitWithCode(Enums\HttpCode::NotFound);
|
||||
}
|
||||
|
||||
if(Session::$User?->Benefits->CanBulkDownload){
|
||||
|
|
|
@ -49,7 +49,7 @@ catch(Exceptions\InvalidPermissionsException){
|
|||
http_response_code(Enums\HttpCode::Forbidden->value);
|
||||
}
|
||||
catch(Exceptions\InvalidFileException){
|
||||
Template::Emit404();
|
||||
Template::ExitWithCode(Enums\HttpCode::NotFound);
|
||||
}
|
||||
|
||||
?><?= Template::Header(['title' => 'Downloading Ebook Collections', 'highlight' => '', 'description' => 'Download zip files containing all of the Standard Ebooks released in a given month.']) ?>
|
||||
|
|
|
@ -67,10 +67,10 @@ try{
|
|||
}
|
||||
}
|
||||
catch(Exceptions\AuthorNotFoundException){
|
||||
Template::Emit404();
|
||||
Template::ExitWithCode(Enums\HttpCode::NotFound);
|
||||
}
|
||||
catch(Exceptions\CollectionNotFoundException){
|
||||
Template::Emit404();
|
||||
Template::ExitWithCode(Enums\HttpCode::NotFound);
|
||||
}
|
||||
|
||||
?><?= Template::Header(['title' => 'Download ', 'highlight' => '', 'description' => 'Download zip files containing all of the Standard Ebooks released in a given month.']) ?>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue