mirror of
https://github.com/standardebooks/web.git
synced 2025-07-21 23:04:57 -04:00
Define some constants to make HTTP input code less wordy
This commit is contained in:
parent
ee7c8343dd
commit
110c091a7b
36 changed files with 87 additions and 86 deletions
|
@ -10,8 +10,8 @@ $showThankYouPage = $GLOBALS['User'] === null && $downloadCount < 5;
|
|||
$downloadUrl = null;
|
||||
|
||||
try{
|
||||
$urlPath = HttpInput::Str(HttpVariableSource::Get, 'url-path') ?? null;
|
||||
$format = EbookFormat::tryFrom(HttpInput::Str(HttpVariableSource::Get, 'format') ?? '') ?? EbookFormat::Epub;
|
||||
$urlPath = HttpInput::Str(GET, 'url-path') ?? null;
|
||||
$format = EbookFormat::tryFrom(HttpInput::Str(GET, 'format') ?? '') ?? EbookFormat::Epub;
|
||||
$wwwFilesystemPath = EBOOKS_DIST_PATH . $urlPath;
|
||||
|
||||
// Do we have the ebook cached?
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue