@@ -37,7 +37,7 @@ discard block |
||
| 37 | 37 | |
| 38 | 38 | public $searchConditions = [ |
| 39 | 39 | 'Caption' => [ |
| 40 | - 'qualifiers' => ['any','caption'] |
|
| 40 | + 'qualifiers' => ['any', 'caption'] |
|
| 41 | 41 | ,'points' => 2 |
| 42 | 42 | ,'sql' => 'Caption LIKE "%%%s%%"', |
| 43 | 43 | ] |
@@ -189,7 +189,7 @@ discard block |
||
| 189 | 189 | } elseif ($_SERVER['REQUEST_METHOD'] == 'PUT') { |
| 190 | 190 | $put = fopen('php://input', 'r'); // open input stream |
| 191 | 191 | |
| 192 | - $tmp = tempnam('/tmp', 'dvr'); // use PHP to make a temporary file |
|
| 192 | + $tmp = tempnam('/tmp', 'dvr'); // use PHP to make a temporary file |
|
| 193 | 193 | $fp = fopen($tmp, 'w'); // open write stream to temp file |
| 194 | 194 | |
| 195 | 195 | // write |
@@ -225,7 +225,7 @@ discard block |
||
| 225 | 225 | } |
| 226 | 226 | |
| 227 | 227 | return $this->respond('uploadComplete', [ |
| 228 | - 'success' => (boolean)$Media |
|
| 228 | + 'success' => (boolean) $Media |
|
| 229 | 229 | ,'data' => $Media |
| 230 | 230 | ]); |
| 231 | 231 | } |
@@ -269,9 +269,9 @@ discard block |
||
| 269 | 269 | } |
| 270 | 270 | |
| 271 | 271 | // send caching headers |
| 272 | - $expires = 60*60*24*365; |
|
| 272 | + $expires = 60 * 60 * 24 * 365; |
|
| 273 | 273 | header("Cache-Control: public, max-age=$expires"); |
| 274 | - header('Expires: '.gmdate('D, d M Y H:i:s \G\M\T', time()+$expires)); |
|
| 274 | + header('Expires: '.gmdate('D, d M Y H:i:s \G\M\T', time() + $expires)); |
|
| 275 | 275 | header('Pragma: public'); |
| 276 | 276 | |
| 277 | 277 | // media are immutable for a given URL, so no need to actually check anything if the browser wants to revalidate its cache |
@@ -492,9 +492,9 @@ discard block |
||
| 492 | 492 | public function handleThumbnailRequest(Media $Media = null): ResponseInterface |
| 493 | 493 | { |
| 494 | 494 | // send caching headers |
| 495 | - $expires = 60*60*24*365; |
|
| 495 | + $expires = 60 * 60 * 24 * 365; |
|
| 496 | 496 | header("Cache-Control: public, max-age=$expires"); |
| 497 | - header('Expires: '.gmdate('D, d M Y H:i:s \G\M\T', time()+$expires)); |
|
| 497 | + header('Expires: '.gmdate('D, d M Y H:i:s \G\M\T', time() + $expires)); |
|
| 498 | 498 | header('Pragma: public'); |
| 499 | 499 | |
| 500 | 500 | |