mirror of
https://github.com/standardebooks/web.git
synced 2025-07-16 03:16:36 -04:00
Replace string path with constant
This commit is contained in:
parent
986183a83f
commit
822ba2a3d7
1 changed files with 1 additions and 1 deletions
|
@ -26,7 +26,7 @@ try{
|
||||||
// This iterator will do a deep scan on the directory. When we hit another directory, the filename will be "." and the path will contain the directory path.
|
// This iterator will do a deep scan on the directory. When we hit another directory, the filename will be "." and the path will contain the directory path.
|
||||||
// We want to find where the "src" directory is, and the directory directly below that will be the final web URL we're looking for.
|
// We want to find where the "src" directory is, and the directory directly below that will be the final web URL we're looking for.
|
||||||
if($file->getFilename() == '.' && preg_match('|/src$|ius', $file->getPath())){
|
if($file->getFilename() == '.' && preg_match('|/src$|ius', $file->getPath())){
|
||||||
throw new SeeOtherEbookException(preg_replace(['|' . SITE_ROOT . '/web/www|ius', '|/src$|ius'], '', $file->getPath()));
|
throw new SeeOtherEbookException(preg_replace(['|' . WEB_ROOT . '|ius', '|/src$|ius'], '', $file->getPath()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue