Merge pull request #474 from SergiX44/analysis-o7r0ep
Apply fixes from StyleCI
This commit is contained in:
commit
15e2c3512c
1 changed files with 9 additions and 9 deletions
|
@ -145,9 +145,9 @@ class MediaController extends Controller
|
||||||
$media = $this->getMedia($userCode, $mediaCode, false);
|
$media = $this->getMedia($userCode, $mediaCode, false);
|
||||||
|
|
||||||
if (!$media || (!$media->published && $this->session->get('user_id') !== $media->user_id && !$this->session->get(
|
if (!$media || (!$media->published && $this->session->get('user_id') !== $media->user_id && !$this->session->get(
|
||||||
'admin',
|
'admin',
|
||||||
false
|
false
|
||||||
))) {
|
))) {
|
||||||
throw new HttpNotFoundException($request);
|
throw new HttpNotFoundException($request);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -179,9 +179,9 @@ class MediaController extends Controller
|
||||||
$media = $this->getMedia($userCode, $mediaCode, false);
|
$media = $this->getMedia($userCode, $mediaCode, false);
|
||||||
|
|
||||||
if (!$media || (!$media->published && $this->session->get('user_id') !== $media->user_id && !$this->session->get(
|
if (!$media || (!$media->published && $this->session->get('user_id') !== $media->user_id && !$this->session->get(
|
||||||
'admin',
|
'admin',
|
||||||
false
|
false
|
||||||
))) {
|
))) {
|
||||||
throw new HttpNotFoundException($request);
|
throw new HttpNotFoundException($request);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -385,9 +385,9 @@ class MediaController extends Controller
|
||||||
$mime = $storage->getMimetype($media->storage_path);
|
$mime = $storage->getMimetype($media->storage_path);
|
||||||
|
|
||||||
if ((param($request, 'width') !== null || param($request, 'height') !== null) && explode(
|
if ((param($request, 'width') !== null || param($request, 'height') !== null) && explode(
|
||||||
'/',
|
'/',
|
||||||
$mime
|
$mime
|
||||||
)[0] === 'image') {
|
)[0] === 'image') {
|
||||||
return $this->makeThumbnail(
|
return $this->makeThumbnail(
|
||||||
$storage,
|
$storage,
|
||||||
$media,
|
$media,
|
||||||
|
|
Loading…
Reference in a new issue