mirror of
https://github.com/standardebooks/web.git
synced 2025-07-15 02:46:46 -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
|
@ -50,7 +50,7 @@ class Library{
|
|||
|
||||
if(!$success){
|
||||
foreach(explode("\n", trim(shell_exec('find ' . SITE_ROOT . '/www/ebooks/ -name "content.opf"') ?? '')) as $filename){
|
||||
$ebookWwwFilesystemPath = preg_replace('|/src/.+|ius', '', $filename);
|
||||
$ebookWwwFilesystemPath = preg_replace('|/src/.+|ius', '', $filename) ?: '';
|
||||
$ebook = apcu_fetch('ebook-' . $ebookWwwFilesystemPath, $success);
|
||||
|
||||
if(!$success){
|
||||
|
@ -78,7 +78,7 @@ class Library{
|
|||
|
||||
foreach(explode("\n", trim(shell_exec('find ' . escapeshellarg($wwwFilesystemPath) . ' -name "content.opf"') ?? '')) as $filename){
|
||||
try{
|
||||
$ebookWwwFilesystemPath = preg_replace('|/src/.+|ius', '', $filename);
|
||||
$ebookWwwFilesystemPath = preg_replace('|/src/.+|ius', '', $filename) ?? '';
|
||||
$ebook = apcu_fetch('ebook-' . $ebookWwwFilesystemPath, $success);
|
||||
|
||||
if(!$success){
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue