@@ -13,7 +13,7 @@ |
||
13 | 13 | } |
14 | 14 | /** @var array $config */ |
15 | 15 | |
16 | -$remote_user = array_key_exists('PHP_AUTH_USER', $_SERVER) ? $_SERVER['PHP_AUTH_USER'] : ''; |
|
16 | +$remote_user = array_key_exists('PHP_AUTH_USER', $_SERVER)?$_SERVER['PHP_AUTH_USER']:''; |
|
17 | 17 | // Clean username, only allow a-z, A-Z, 0-9, -_ chars |
18 | 18 | $remote_user = preg_replace('/[^a-zA-Z0-9_-]/', '', $remote_user); |
19 | 19 | $user_config_file = 'config_local.' . $remote_user . '.php'; |
@@ -26,10 +26,10 @@ discard block |
||
26 | 26 | ob_end_clean(); |
27 | 27 | } |
28 | 28 | |
29 | -$expires = 60*60*24*14; |
|
29 | +$expires = 60 * 60 * 24 * 14; |
|
30 | 30 | header('Pragma: public'); |
31 | 31 | header('Cache-Control: max-age=' . $expires); |
32 | -header('Expires: ' . gmdate('D, d M Y H:i:s', time()+$expires) . ' GMT'); |
|
32 | +header('Expires: ' . gmdate('D, d M Y H:i:s', time() + $expires) . ' GMT'); |
|
33 | 33 | $bookId = getURLParam('id', null); |
34 | 34 | $type = getURLParam('type', 'jpg'); |
35 | 35 | $idData = getURLParam('data', null); |
@@ -73,7 +73,7 @@ discard block |
||
73 | 73 | if (isset($config['cops_thumbnail_cache_directory']) && $config['cops_thumbnail_cache_directory'] !== '') { |
74 | 74 | $thumbnailCacheFullpath = $config['cops_thumbnail_cache_directory']; |
75 | 75 | //if multiple databases, add a subfolder with the database ID |
76 | - $thumbnailCacheFullpath .= !is_null(GetUrlParam(DB)) ? 'db-' . GetUrlParam(DB) . DIRECTORY_SEPARATOR : ''; |
|
76 | + $thumbnailCacheFullpath .= !is_null(GetUrlParam(DB))?'db-' . GetUrlParam(DB) . DIRECTORY_SEPARATOR:''; |
|
77 | 77 | //when there are lots of thumbnails, it's better to save files in subfolders, so if the book's uuid is |
78 | 78 | //"01234567-89ab-cdef-0123-456789abcdef", we will save the thumbnail in .../0/12/34567-89ab-cdef-0123-456789abcdef-... |
79 | 79 | $thumbnailCacheFullpath .= substr($book->uuid, 0, 1) . DIRECTORY_SEPARATOR . substr($book->uuid, 1, 2) . DIRECTORY_SEPARATOR; |