@@ -232,7 +232,7 @@ discard block |
||
| 232 | 232 | } |
| 233 | 233 | |
| 234 | 234 | // Retrieve the folder object. |
| 235 | - $folder = ResourceFactory::getInstance()->getFolderObjectFromCombinedIdentifier($storage->getUid() . ':' . $identifier); |
|
| 235 | + $folder = ResourceFactory::getInstance()->getFolderObjectFromCombinedIdentifier($storage->getUid().':'.$identifier); |
|
| 236 | 236 | |
| 237 | 237 | // Disallow the rendering of the processing folder (e.g. could be called manually) |
| 238 | 238 | // and all folders without any defined storage |
@@ -289,11 +289,11 @@ discard block |
||
| 289 | 289 | |
| 290 | 290 | // Get a possible mount point coming from the storage record. |
| 291 | 291 | $storageRecord = $storage->getStorageRecord(); |
| 292 | - $mountPointIdentifier = $storageRecord['mount_point_file_type_' . $uploadedFile->getType()]; |
|
| 292 | + $mountPointIdentifier = $storageRecord['mount_point_file_type_'.$uploadedFile->getType()]; |
|
| 293 | 293 | if ($mountPointIdentifier > 0) { |
| 294 | 294 | |
| 295 | 295 | // We don't have a Mount Point repository in FAL, so query the database directly. |
| 296 | - $record = $this->getDatabaseConnection()->exec_SELECTgetSingleRow('path', 'sys_filemounts', 'deleted = 0 AND uid = ' . $mountPointIdentifier); |
|
| 296 | + $record = $this->getDatabaseConnection()->exec_SELECTgetSingleRow('path', 'sys_filemounts', 'deleted = 0 AND uid = '.$mountPointIdentifier); |
|
| 297 | 297 | if (!empty($record['path'])) { |
| 298 | 298 | $folder = $storage->getFolder($record['path']); |
| 299 | 299 | } |
@@ -316,12 +316,12 @@ discard block |
||
| 316 | 316 | |
| 317 | 317 | // Retrieve storage record and a possible configured mount point. |
| 318 | 318 | $storageRecord = $storage->getStorageRecord(); |
| 319 | - $mountPointIdentifier = $storageRecord['mount_point_file_type_' . $file->getType()]; |
|
| 319 | + $mountPointIdentifier = $storageRecord['mount_point_file_type_'.$file->getType()]; |
|
| 320 | 320 | |
| 321 | 321 | if ($mountPointIdentifier > 0) { |
| 322 | 322 | |
| 323 | 323 | // We don't have a Mount Point repository in FAL, so query the database directly. |
| 324 | - $record = $this->getDatabaseConnection()->exec_SELECTgetSingleRow('path', 'sys_filemounts', 'deleted = 0 AND uid = ' . $mountPointIdentifier); |
|
| 324 | + $record = $this->getDatabaseConnection()->exec_SELECTgetSingleRow('path', 'sys_filemounts', 'deleted = 0 AND uid = '.$mountPointIdentifier); |
|
| 325 | 325 | if (!empty($record['path'])) { |
| 326 | 326 | $folder = $storage->getFolder($record['path']); |
| 327 | 327 | } |
@@ -54,7 +54,7 @@ |
||
| 54 | 54 | { |
| 55 | 55 | $size = ConfigurationUtility::getInstance()->get($preset); |
| 56 | 56 | if (is_null($size)) { |
| 57 | - throw new \Fab\Media\Exception\EmptyValueException('No value for preset: ' . $preset, 1362501066); |
|
| 57 | + throw new \Fab\Media\Exception\EmptyValueException('No value for preset: '.$preset, 1362501066); |
|
| 58 | 58 | } |
| 59 | 59 | |
| 60 | 60 | $this->currentPreset = $preset; |
@@ -38,11 +38,11 @@ discard block |
||
| 38 | 38 | { |
| 39 | 39 | |
| 40 | 40 | // If file is not found, resolve the path |
| 41 | - if (!is_file(PATH_site . $resource)) { |
|
| 41 | + if (!is_file(PATH_site.$resource)) { |
|
| 42 | 42 | $resource = substr(self::resolvePath($resource), strlen(PATH_site)); |
| 43 | 43 | } |
| 44 | 44 | |
| 45 | - return PathUtility::getRelativePathTo(PathUtility::dirname(PATH_site . $resource)) . PathUtility::basename($resource); |
|
| 45 | + return PathUtility::getRelativePathTo(PathUtility::dirname(PATH_site.$resource)).PathUtility::basename($resource); |
|
| 46 | 46 | } |
| 47 | 47 | |
| 48 | 48 | /** |
@@ -54,8 +54,8 @@ discard block |
||
| 54 | 54 | static public function resolvePath($resource) |
| 55 | 55 | { |
| 56 | 56 | $resource = self::canonicalPath($resource); |
| 57 | - if (!is_file(PATH_site . $resource)) { |
|
| 58 | - $resource = 'EXT:' . GeneralUtility::camelCaseToLowerCaseUnderscored(self::$extensionName) . '/Resources/Public/' . $resource; |
|
| 57 | + if (!is_file(PATH_site.$resource)) { |
|
| 58 | + $resource = 'EXT:'.GeneralUtility::camelCaseToLowerCaseUnderscored(self::$extensionName).'/Resources/Public/'.$resource; |
|
| 59 | 59 | } |
| 60 | 60 | return GeneralUtility::getFileAbsFileName($resource); |
| 61 | 61 | } |
@@ -85,13 +85,13 @@ discard block |
||
| 85 | 85 | // Compute a possible limit and offset for the query. |
| 86 | 86 | $limitAndOffset = ''; |
| 87 | 87 | if ($limit > 0 || $offset > 0) { |
| 88 | - $limitAndOffset = $limit . ' OFFSET ' . $offset; |
|
| 88 | + $limitAndOffset = $limit.' OFFSET '.$offset; |
|
| 89 | 89 | } |
| 90 | 90 | |
| 91 | 91 | // Retrieve file records. |
| 92 | 92 | $clause = 'storage > 0'; |
| 93 | 93 | if ($this->storage) { |
| 94 | - $clause = 'storage = ' . $this->storage->getUid(); |
|
| 94 | + $clause = 'storage = '.$this->storage->getUid(); |
|
| 95 | 95 | } |
| 96 | 96 | |
| 97 | 97 | $query = $this->getDatabaseConnection()->SELECTquery('*', 'sys_file', $clause, '', '', $limitAndOffset); |
@@ -164,7 +164,7 @@ discard block |
||
| 164 | 164 | { |
| 165 | 165 | $clause = 'storage > 0'; |
| 166 | 166 | if ($this->storage) { |
| 167 | - $clause = 'storage = ' . $this->storage->getUid(); |
|
| 167 | + $clause = 'storage = '.$this->storage->getUid(); |
|
| 168 | 168 | } |
| 169 | 169 | $record = $this->getDatabaseConnection()->exec_SELECTgetSingleRow('count(*) AS totalNumberOfFiles', 'sys_file', $clause); |
| 170 | 170 | return (int)$record['totalNumberOfFiles']; |
@@ -131,7 +131,7 @@ |
||
| 131 | 131 | public function prefixUri($uri) |
| 132 | 132 | { |
| 133 | 133 | if ($this->isFrontendMode() && $this->getFrontendObject()->absRefPrefix) { |
| 134 | - $uri = $this->getFrontendObject()->absRefPrefix . $uri; |
|
| 134 | + $uri = $this->getFrontendObject()->absRefPrefix.$uri; |
|
| 135 | 135 | } |
| 136 | 136 | return $uri; |
| 137 | 137 | } |
@@ -91,7 +91,7 @@ discard block |
||
| 91 | 91 | |
| 92 | 92 | return sprintf('<img src="%s%s" title="%s" alt="%s" %s/>', |
| 93 | 93 | $result, |
| 94 | - $this->thumbnailService->getAppendTimeStamp() ? $parameterSeparator . $this->processedFile->getProperty('tstamp') : '', |
|
| 94 | + $this->thumbnailService->getAppendTimeStamp() ? $parameterSeparator.$this->processedFile->getProperty('tstamp') : '', |
|
| 95 | 95 | $this->getTitle(), |
| 96 | 96 | $this->getTitle(), |
| 97 | 97 | $this->renderAttributes() |
@@ -146,7 +146,7 @@ discard block |
||
| 146 | 146 | |
| 147 | 147 | return sprintf('<a href="%s%s" target="%s" data-uid="%s">%s</a>', |
| 148 | 148 | $url, |
| 149 | - $this->thumbnailService->getAppendTimeStamp() && !$this->thumbnailService->getAnchorUri() ? $parameterSeparator . $file->getProperty('tstamp') : '', |
|
| 149 | + $this->thumbnailService->getAppendTimeStamp() && !$this->thumbnailService->getAnchorUri() ? $parameterSeparator.$file->getProperty('tstamp') : '', |
|
| 150 | 150 | $this->thumbnailService->getTarget(), |
| 151 | 151 | $file->getUid(), |
| 152 | 152 | $result |
@@ -49,7 +49,7 @@ |
||
| 49 | 49 | // Work around a bug in BackendUtility::getModuleUrl if matches is empty getModuleUrl() will not return the parameter. |
| 50 | 50 | $matches = $this->templateVariableContainer->get('matches'); |
| 51 | 51 | if (empty($matches)) { |
| 52 | - $moduleUrl .= '&' . urlencode(VidiModule::getParameterPrefix() . '[matches]='); |
|
| 52 | + $moduleUrl .= '&'.urlencode(VidiModule::getParameterPrefix().'[matches]='); |
|
| 53 | 53 | } |
| 54 | 54 | |
| 55 | 55 | return $moduleUrl; |
@@ -56,7 +56,7 @@ discard block |
||
| 56 | 56 | $file->getProperty('crdate') ? $this->formatDate($arguments, $file->getProperty('crdate')) : '', |
| 57 | 57 | $this->getUserName($file->getProperty('cruser_id')), |
| 58 | 58 | LocalizationUtility::translate('updated_on', 'media'), |
| 59 | - $file->getProperty('tstamp') ? $this->formatDate($arguments, '@' . $file->getProperty('tstamp')) : '', |
|
| 59 | + $file->getProperty('tstamp') ? $this->formatDate($arguments, '@'.$file->getProperty('tstamp')) : '', |
|
| 60 | 60 | $this->getUserName($file->getProperty('upuser_id')) |
| 61 | 61 | ); |
| 62 | 62 | |
@@ -76,7 +76,7 @@ discard block |
||
| 76 | 76 | $username = ''; |
| 77 | 77 | |
| 78 | 78 | if ($userIdentifier > 0) { |
| 79 | - $record = $this->getDatabaseConnection()->exec_SELECTgetSingleRow('*', 'be_users', 'uid = ' . $userIdentifier); |
|
| 79 | + $record = $this->getDatabaseConnection()->exec_SELECTgetSingleRow('*', 'be_users', 'uid = '.$userIdentifier); |
|
| 80 | 80 | $username = sprintf('%s %s', |
| 81 | 81 | LocalizationUtility::translate('by', 'media'), |
| 82 | 82 | empty($record['realName']) ? $record['username'] : $record['realName'] |
@@ -126,12 +126,12 @@ discard block |
||
| 126 | 126 | |
| 127 | 127 | if (!$date instanceof \DateTimeInterface) { |
| 128 | 128 | try { |
| 129 | - $base = $base instanceof \DateTimeInterface ? $base->format('U') : strtotime((MathUtility::canBeInterpretedAsInteger($base) ? '@' : '') . $base); |
|
| 130 | - $dateTimestamp = strtotime((MathUtility::canBeInterpretedAsInteger($date) ? '@' : '') . $date, $base); |
|
| 131 | - $date = new \DateTime('@' . $dateTimestamp); |
|
| 129 | + $base = $base instanceof \DateTimeInterface ? $base->format('U') : strtotime((MathUtility::canBeInterpretedAsInteger($base) ? '@' : '').$base); |
|
| 130 | + $dateTimestamp = strtotime((MathUtility::canBeInterpretedAsInteger($date) ? '@' : '').$date, $base); |
|
| 131 | + $date = new \DateTime('@'.$dateTimestamp); |
|
| 132 | 132 | $date->setTimezone(new \DateTimeZone(date_default_timezone_get())); |
| 133 | 133 | } catch (\Exception $exception) { |
| 134 | - throw new Exception('"' . $date . '" could not be parsed by \DateTime constructor: ' . $exception->getMessage(), 1241722579); |
|
| 134 | + throw new Exception('"'.$date.'" could not be parsed by \DateTime constructor: '.$exception->getMessage(), 1241722579); |
|
| 135 | 135 | } |
| 136 | 136 | } |
| 137 | 137 | |
@@ -42,7 +42,7 @@ |
||
| 42 | 42 | $permission .= 'W'; |
| 43 | 43 | } |
| 44 | 44 | |
| 45 | - return '<strong>' . $permission . '</strong>'; |
|
| 45 | + return '<strong>'.$permission.'</strong>'; |
|
| 46 | 46 | } |
| 47 | 47 | |
| 48 | 48 | /** |