mirror of
https://github.com/standardebooks/web.git
synced 2025-07-20 05:14:48 -04:00
More refactoring for static analysis
This commit is contained in:
parent
5939195955
commit
ba53958596
9 changed files with 55 additions and 36 deletions
|
@ -2,7 +2,7 @@
|
|||
require_once('Core.php');
|
||||
|
||||
try{
|
||||
$urlPath = trim(str_replace('.', '', HttpInput::GetString('url-path')), '/'); // Contains the portion of the URL (without query string) that comes after https://standardebooks.org/ebooks/
|
||||
$urlPath = trim(str_replace('.', '', HttpInput::GetString('url-path') ?? ''), '/'); // Contains the portion of the URL (without query string) that comes after https://standardebooks.org/ebooks/
|
||||
$wwwFilesystemPath = SITE_ROOT . '/www/ebooks/' . $urlPath; // Path to the deployed WWW files for this ebook
|
||||
|
||||
if($urlPath == '' || mb_stripos($wwwFilesystemPath, SITE_ROOT . '/www/ebooks/') !== 0 || !is_dir($wwwFilesystemPath)){
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue