From 7271907053e9be6e6d3640769adc163859dc5317 Mon Sep 17 00:00:00 2001 From: Matthias Schmidt Date: Sun, 3 Jan 2016 09:58:37 +0100 Subject: [PATCH] Fix comments --- .../files/lib/data/media/MediaAction.class.php | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/wcfsetup/install/files/lib/data/media/MediaAction.class.php b/wcfsetup/install/files/lib/data/media/MediaAction.class.php index e5662a5736..9957afbd10 100644 --- a/wcfsetup/install/files/lib/data/media/MediaAction.class.php +++ b/wcfsetup/install/files/lib/data/media/MediaAction.class.php @@ -19,7 +19,7 @@ use wcf\util\FileUtil; * Executes madia file-related actions. * * @author Matthias Schmidt - * @copyright 2001-2015 WoltLab GmbH + * @copyright 2001-2016 WoltLab GmbH * @license GNU Lesser General Public License * @package com.woltlab.wcf * @subpackage data.media @@ -61,14 +61,13 @@ class MediaAction extends AbstractDatabaseObjectAction implements ISearchAction, ]; if (!empty($mediaFiles)) { - // get attachment ids - $mediaIDs = $mediaToFileID = array(); + $mediaIDs = $mediaToFileID = []; foreach ($mediaFiles as $internalFileID => $media) { $mediaIDs[] = $media->mediaID; $mediaToFileID[$media->mediaID] = $internalFileID; } - // get attachments from database (check thumbnail status) + // fetch media objects from database $mediaList = new MediaList(); $mediaList->setObjectIDs($mediaIDs); $mediaList->readObjects(); @@ -81,11 +80,11 @@ class MediaAction extends AbstractDatabaseObjectAction implements ISearchAction, $files = $this->parameters['__files']->getFiles(); foreach ($files as $file) { if ($file->getValidationErrorType()) { - $result['errors'][$file->getInternalFileID()] = array( + $result['errors'][$file->getInternalFileID()] = [ 'filename' => $file->getFilename(), 'filesize' => $file->getFilesize(), 'errorType' => $file->getValidationErrorType() - ); + ]; } } -- 2.20.1