lint: php
parent
ae9b01de19
commit
6707050883
|
@ -86,7 +86,8 @@ class ImageController extends ApiBase
|
||||||
*
|
*
|
||||||
* Get preview of many images
|
* Get preview of many images
|
||||||
*/
|
*/
|
||||||
public function multipreview() {
|
public function multipreview()
|
||||||
|
{
|
||||||
// read body to array
|
// read body to array
|
||||||
try {
|
try {
|
||||||
$body = file_get_contents('php://input');
|
$body = file_get_contents('php://input');
|
||||||
|
@ -106,7 +107,7 @@ class ImageController extends ApiBase
|
||||||
|
|
||||||
// stream the response
|
// stream the response
|
||||||
header('Content-Type: application/octet-stream');
|
header('Content-Type: application/octet-stream');
|
||||||
header('Expires: ' . \gmdate('D, d M Y H:i:s \G\M\T', \time() + 7 * 3600 * 24));
|
header('Expires: '.gmdate('D, d M Y H:i:s \G\M\T', time() + 7 * 3600 * 24));
|
||||||
header('Cache-Control: max-age='. 7 * 3600 * 24 .', private');
|
header('Cache-Control: max-age='. 7 * 3600 * 24 .', private');
|
||||||
|
|
||||||
foreach ($files as $bodyFile) {
|
foreach ($files as $bodyFile) {
|
||||||
|
@ -114,7 +115,7 @@ class ImageController extends ApiBase
|
||||||
$fileid = (int) $bodyFile['fileid'];
|
$fileid = (int) $bodyFile['fileid'];
|
||||||
$x = (int) $bodyFile['x'];
|
$x = (int) $bodyFile['x'];
|
||||||
$y = (int) $bodyFile['y'];
|
$y = (int) $bodyFile['y'];
|
||||||
$a = $bodyFile['a'] === '1';
|
$a = '1' === $bodyFile['a'];
|
||||||
|
|
||||||
$file = $this->getUserFile($fileid);
|
$file = $this->getUserFile($fileid);
|
||||||
if (!$file) {
|
if (!$file) {
|
||||||
|
|
Loading…
Reference in New Issue