@@ -83,7 +83,7 @@ discard block |
||
| 83 | 83 | */ |
| 84 | 84 | public function getFileWithAbsolutePath() |
| 85 | 85 | { |
| 86 | - return $this->uploadFolder . DIRECTORY_SEPARATOR . $this->name; |
|
| 86 | + return $this->uploadFolder.DIRECTORY_SEPARATOR.$this->name; |
|
| 87 | 87 | } |
| 88 | 88 | |
| 89 | 89 | /** |
@@ -94,7 +94,7 @@ discard block |
||
| 94 | 94 | public function getPublicUrl() |
| 95 | 95 | { |
| 96 | 96 | $fileNameAndPath = str_replace(PATH_site, '', $this->getFileWithAbsolutePath()); |
| 97 | - return '/' . ltrim($fileNameAndPath, '/'); |
|
| 97 | + return '/'.ltrim($fileNameAndPath, '/'); |
|
| 98 | 98 | } |
| 99 | 99 | |
| 100 | 100 | /** |
@@ -11,7 +11,7 @@ discard block |
||
| 11 | 11 | |
| 12 | 12 | $tca = [ |
| 13 | 13 | 'types' => [ |
| 14 | - 0 => ['showitem' => $GLOBALS['TCA']['sys_file_storage']['types'][0]['showitem'] . ', |
|
| 14 | + 0 => ['showitem' => $GLOBALS['TCA']['sys_file_storage']['types'][0]['showitem'].', |
|
| 15 | 15 | |
| 16 | 16 | --div--;LLL:EXT:media/Resources/Private/Language/locallang_db.xlf:tab.upload_settings, |
| 17 | 17 | maximum_dimension_original_image, extension_allowed_file_type_1, extension_allowed_file_type_2, extension_allowed_file_type_3, extension_allowed_file_type_4, extension_allowed_file_type_5, |
@@ -81,7 +81,7 @@ discard block |
||
| 81 | 81 | $tcaForHiddenFolderTree = [ |
| 82 | 82 | |
| 83 | 83 | 'types' => [ |
| 84 | - 0 => ['showitem' => $GLOBALS['TCA']['sys_file_storage']['types'][0]['showitem'] . ', |
|
| 84 | + 0 => ['showitem' => $GLOBALS['TCA']['sys_file_storage']['types'][0]['showitem'].', |
|
| 85 | 85 | |
| 86 | 86 | --div--;LLL:EXT:media/Resources/Private/Language/locallang_db.xlf:tab.media_mount_point, |
| 87 | 87 | mount_point_file_type_1, mount_point_file_type_2, mount_point_file_type_3, mount_point_file_type_4, mount_point_file_type_5, |
@@ -43,7 +43,7 @@ discard block |
||
| 43 | 43 | { |
| 44 | 44 | |
| 45 | 45 | $relativePath = sprintf('Icons/MimeType/%s.png', $this->getFile()->getProperty('extension')); |
| 46 | - $fileNameAndPath = GeneralUtility::getFileAbsFileName('EXT:media/Resources/Public/' . $relativePath); |
|
| 46 | + $fileNameAndPath = GeneralUtility::getFileAbsFileName('EXT:media/Resources/Public/'.$relativePath); |
|
| 47 | 47 | if (!file_exists($fileNameAndPath)) { |
| 48 | 48 | $relativePath = 'Icons/UnknownMimeType.png'; |
| 49 | 49 | } |
@@ -68,7 +68,7 @@ discard block |
||
| 68 | 68 | return sprintf( |
| 69 | 69 | '<img src="%s%s" title="%s" alt="%s" %s/>', |
| 70 | 70 | $result, |
| 71 | - $this->thumbnailService->getAppendTimeStamp() ? $parameterSeparator . $this->getFile()->getProperty('tstamp') : '', |
|
| 71 | + $this->thumbnailService->getAppendTimeStamp() ? $parameterSeparator.$this->getFile()->getProperty('tstamp') : '', |
|
| 72 | 72 | $this->getTitle(), |
| 73 | 73 | $this->getTitle(), |
| 74 | 74 | $this->renderAttributes() |
@@ -103,7 +103,7 @@ discard block |
||
| 103 | 103 | return sprintf( |
| 104 | 104 | '<a href="%s%s" target="%s" data-uid="%s">%s</a>', |
| 105 | 105 | $this->thumbnailService->getAnchorUri() ? $this->thumbnailService->getAnchorUri() : $file->getPublicUrl(true), |
| 106 | - $this->thumbnailService->getAppendTimeStamp() ? '?' . $file->getProperty('tstamp') : '', |
|
| 106 | + $this->thumbnailService->getAppendTimeStamp() ? '?'.$file->getProperty('tstamp') : '', |
|
| 107 | 107 | $this->thumbnailService->getTarget(), |
| 108 | 108 | $file->getUid(), |
| 109 | 109 | $result |
@@ -55,11 +55,11 @@ discard block |
||
| 55 | 55 | */ |
| 56 | 56 | public static function setOrientation($filename, $orientation) |
| 57 | 57 | { |
| 58 | - $exif_data = []; // Buffer |
|
| 58 | + $exif_data = []; // Buffer |
|
| 59 | 59 | $offsetJfif = 0; |
| 60 | 60 | |
| 61 | 61 | if (($fh = fopen($filename, 'rb+')) === false) { |
| 62 | - throw new \RuntimeException('Can\'t open ' . $filename, 1363533724); |
|
| 62 | + throw new \RuntimeException('Can\'t open '.$filename, 1363533724); |
|
| 63 | 63 | } |
| 64 | 64 | |
| 65 | 65 | // Read file head, check for JPEG SOI + JFIF/Exif APP1 |
@@ -73,7 +73,7 @@ discard block |
||
| 73 | 73 | if ($exif_data[2] === 0xFF && $exif_data[3] === 0xE0) { |
| 74 | 74 | // Get the marker parameter length count |
| 75 | 75 | $length = self::read_2_bytes($fh); |
| 76 | - $offsetJfif = $length + 2; // "+ 2" to skip the 2 bytes introducing this additional segment |
|
| 76 | + $offsetJfif = $length + 2; // "+ 2" to skip the 2 bytes introducing this additional segment |
|
| 77 | 77 | // Length includes itself, so must be at least 2 |
| 78 | 78 | // Following JFIF data length must be at least 6 |
| 79 | 79 | if ($length < 8) { |
@@ -204,9 +204,9 @@ discard block |
||
| 204 | 204 | |
| 205 | 205 | // Set the Orientation value |
| 206 | 206 | if ($is_motorola) { |
| 207 | - $exif_data[$offset + 2] = 0; // Format = unsigned short (2 octets) |
|
| 207 | + $exif_data[$offset + 2] = 0; // Format = unsigned short (2 octets) |
|
| 208 | 208 | $exif_data[$offset + 3] = 3; |
| 209 | - $exif_data[$offset + 4] = 0; // Number of Components = 1 |
|
| 209 | + $exif_data[$offset + 4] = 0; // Number of Components = 1 |
|
| 210 | 210 | $exif_data[$offset + 5] = 0; |
| 211 | 211 | $exif_data[$offset + 6] = 0; |
| 212 | 212 | $exif_data[$offset + 7] = 1; |
@@ -215,9 +215,9 @@ discard block |
||
| 215 | 215 | $exif_data[$offset + 10] = 0; |
| 216 | 216 | $exif_data[$offset + 11] = 0; |
| 217 | 217 | } else { |
| 218 | - $exif_data[$offset + 2] = 3; // Format = unsigned short (2 octets) |
|
| 218 | + $exif_data[$offset + 2] = 3; // Format = unsigned short (2 octets) |
|
| 219 | 219 | $exif_data[$offset + 3] = 0; |
| 220 | - $exif_data[$offset + 4] = 1; // Number of Components = 1 |
|
| 220 | + $exif_data[$offset + 4] = 1; // Number of Components = 1 |
|
| 221 | 221 | $exif_data[$offset + 5] = 0; |
| 222 | 222 | $exif_data[$offset + 6] = 0; |
| 223 | 223 | $exif_data[$offset + 7] = 0; |
@@ -46,7 +46,7 @@ discard block |
||
| 46 | 46 | |
| 47 | 47 | // Only add like condition if needed. |
| 48 | 48 | if ($folder->getStorage()->getRootLevelFolder() !== $folder) { |
| 49 | - $matcher->like('identifier', $folder->getIdentifier() . '%', $automaticallyAddWildCard = false); |
|
| 49 | + $matcher->like('identifier', $folder->getIdentifier().'%', $automaticallyAddWildCard = false); |
|
| 50 | 50 | } |
| 51 | 51 | } else { |
| 52 | 52 | |
@@ -71,7 +71,7 @@ discard block |
||
| 71 | 71 | $collectedFiles = []; |
| 72 | 72 | foreach ($fileMounts as $fileMount) { |
| 73 | 73 | |
| 74 | - $combinedIdentifier = $fileMount['base'] . ':' . $fileMount['path']; |
|
| 74 | + $combinedIdentifier = $fileMount['base'].':'.$fileMount['path']; |
|
| 75 | 75 | $folder = ResourceFactory::getInstance()->getFolderObjectFromCombinedIdentifier($combinedIdentifier); |
| 76 | 76 | |
| 77 | 77 | $files = $this->getFileUids($folder); |
@@ -183,7 +183,7 @@ discard block |
||
| 183 | 183 | if ($fileMountRecord['path']) { |
| 184 | 184 | $constraintsRespectingFileMounts[] = $query->like( |
| 185 | 185 | 'identifier', |
| 186 | - $fileMountRecord['path'] . '%' |
|
| 186 | + $fileMountRecord['path'].'%' |
|
| 187 | 187 | ); |
| 188 | 188 | } |
| 189 | 189 | } |
@@ -29,7 +29,7 @@ discard block |
||
| 29 | 29 | public function searchForMissingFiles(ResourceStorage $storage) |
| 30 | 30 | { |
| 31 | 31 | |
| 32 | - $query = $this->getDatabaseConnection()->SELECTquery('*', 'sys_file', 'storage = ' . $storage->getUid()); |
|
| 32 | + $query = $this->getDatabaseConnection()->SELECTquery('*', 'sys_file', 'storage = '.$storage->getUid()); |
|
| 33 | 33 | $resource = $this->getDatabaseConnection()->sql_query($query); |
| 34 | 34 | |
| 35 | 35 | $missingFiles = []; |
@@ -67,7 +67,7 @@ discard block |
||
| 67 | 67 | // The case is special as we have a missing file in the file system |
| 68 | 68 | // As a result, we can't use $fileObject->delete(); which will |
| 69 | 69 | // raise exception "Error while fetching permissions" |
| 70 | - $this->getDatabaseConnection()->exec_DELETEquery('sys_file', 'uid = ' . $missingFile->getUid()); |
|
| 70 | + $this->getDatabaseConnection()->exec_DELETEquery('sys_file', 'uid = '.$missingFile->getUid()); |
|
| 71 | 71 | $deletedFiles[$missingFile->getUid()] = $missingFile->getIdentifier(); |
| 72 | 72 | } |
| 73 | 73 | } catch (\Exception $e) { |
@@ -44,7 +44,7 @@ discard block |
||
| 44 | 44 | $sizeUnit = empty($configuration['sizeUnit']) ? 1000 : $configuration['sizeUnit']; |
| 45 | 45 | $value = round($file->getSize() / $sizeUnit); |
| 46 | 46 | } |
| 47 | - $result = str_replace('%' . $metadataProperty, $value, $result); |
|
| 47 | + $result = str_replace('%'.$metadataProperty, $value, $result); |
|
| 48 | 48 | } |
| 49 | 49 | |
| 50 | 50 | return $result; |
@@ -62,7 +62,7 @@ discard block |
||
| 62 | 62 | $template = '%size KB'; |
| 63 | 63 | |
| 64 | 64 | if ($file->getType() == File::FILETYPE_IMAGE) { |
| 65 | - $template = '%width x %height - ' . $template; |
|
| 65 | + $template = '%width x %height - '.$template; |
|
| 66 | 66 | } |
| 67 | 67 | |
| 68 | 68 | return $template; |
@@ -73,7 +73,7 @@ |
||
| 73 | 73 | return sprintf( |
| 74 | 74 | '<img src="%s%s" title="%s" alt="%s" %s/>', |
| 75 | 75 | $result, |
| 76 | - $this->thumbnailService->getAppendTimeStamp() ? $parameterSeparator . $this->getTimeStamp() : '', |
|
| 76 | + $this->thumbnailService->getAppendTimeStamp() ? $parameterSeparator.$this->getTimeStamp() : '', |
|
| 77 | 77 | $this->getTitle(), |
| 78 | 78 | $this->getTitle(), |
| 79 | 79 | $this->renderAttributes() |
@@ -43,7 +43,7 @@ discard block |
||
| 43 | 43 | { |
| 44 | 44 | |
| 45 | 45 | $relativePath = sprintf('Icons/MimeType/%s.png', $this->getFile()->getProperty('extension')); |
| 46 | - $fileNameAndPath = GeneralUtility::getFileAbsFileName('EXT:media/Resources/Public/' . $relativePath); |
|
| 46 | + $fileNameAndPath = GeneralUtility::getFileAbsFileName('EXT:media/Resources/Public/'.$relativePath); |
|
| 47 | 47 | if (!file_exists($fileNameAndPath)) { |
| 48 | 48 | $relativePath = 'Icons/UnknownMimeType.png'; |
| 49 | 49 | } |
@@ -68,7 +68,7 @@ discard block |
||
| 68 | 68 | return sprintf( |
| 69 | 69 | '<img src="%s%s" title="%s" alt="%s" %s/>', |
| 70 | 70 | $result, |
| 71 | - $this->thumbnailService->getAppendTimeStamp() ? $parameterSeparator . $this->getFile()->getProperty('tstamp') : '', |
|
| 71 | + $this->thumbnailService->getAppendTimeStamp() ? $parameterSeparator.$this->getFile()->getProperty('tstamp') : '', |
|
| 72 | 72 | $this->getTitle(), |
| 73 | 73 | $this->getTitle(), |
| 74 | 74 | $this->renderAttributes() |
@@ -103,7 +103,7 @@ discard block |
||
| 103 | 103 | return sprintf( |
| 104 | 104 | '<a href="%s%s" target="%s" data-uid="%s">%s</a>', |
| 105 | 105 | $this->thumbnailService->getAnchorUri() ? $this->thumbnailService->getAnchorUri() : $file->getPublicUrl(true), |
| 106 | - $this->thumbnailService->getAppendTimeStamp() ? '?' . $file->getProperty('tstamp') : '', |
|
| 106 | + $this->thumbnailService->getAppendTimeStamp() ? '?'.$file->getProperty('tstamp') : '', |
|
| 107 | 107 | $this->thumbnailService->getTarget(), |
| 108 | 108 | $file->getUid(), |
| 109 | 109 | $result |