@@ -326,7 +326,7 @@ discard block |
||
| 326 | 326 | protected function init() |
| 327 | 327 | { |
| 328 | 328 | parent::init(); |
| 329 | - if (! Permission::check('ADMIN')) { |
|
| 329 | + if (!Permission::check('ADMIN')) { |
|
| 330 | 330 | return Security::permissionFailure($this); |
| 331 | 331 | } |
| 332 | 332 | |
@@ -371,7 +371,7 @@ discard block |
||
| 371 | 371 | |
| 372 | 372 | $extensions = $this->request->getVar('extensions'); |
| 373 | 373 | if ($extensions) { |
| 374 | - if (! is_array($extensions)) { |
|
| 374 | + if (!is_array($extensions)) { |
|
| 375 | 375 | $extensions = [$extensions]; |
| 376 | 376 | } |
| 377 | 377 | |
@@ -521,7 +521,7 @@ discard block |
||
| 521 | 521 | $i = 0; |
| 522 | 522 | if ($this->getAllFilesInfoProvider()->getTotalFileCountRaw() > $step) { |
| 523 | 523 | for ($i = $step; ($i - $step) < $this->totalFileCountFiltered; $i += $step) { |
| 524 | - if ($i > $this->limit && ! isset($array[$this->limit])) { |
|
| 524 | + if ($i > $this->limit && !isset($array[$this->limit])) { |
|
| 525 | 525 | $array[$this->limit] = $this->limit; |
| 526 | 526 | } |
| 527 | 527 | |
@@ -207,7 +207,7 @@ discard block |
||
| 207 | 207 | */ |
| 208 | 208 | public function getStagingData(string $pathFromAssets, ?int $id = 0): array |
| 209 | 209 | { |
| 210 | - if (! $id) { |
|
| 210 | + if (!$id) { |
|
| 211 | 211 | echo "Searching for " . $pathFromAssets . ' in ' . print_r($this->databaseLookupListStaging, 1); |
| 212 | 212 | $id = $this->databaseLookupListStaging[$pathFromAssets] ?? 0; |
| 213 | 213 | } |
@@ -222,7 +222,7 @@ discard block |
||
| 222 | 222 | */ |
| 223 | 223 | public function getLiveData(string $pathFromAssets, ?int $id = 0): array |
| 224 | 224 | { |
| 225 | - if (! $id) { |
|
| 225 | + if (!$id) { |
|
| 226 | 226 | $id = $this->databaseLookupListLive[$pathFromAssets] ?? 0; |
| 227 | 227 | } |
| 228 | 228 | |
@@ -424,7 +424,7 @@ discard block |
||
| 424 | 424 | protected function registerFile($path, ?bool $inFileSystem = true) |
| 425 | 425 | { |
| 426 | 426 | if ($path) { |
| 427 | - if (! isset($this->listOfFiles[$path])) { |
|
| 427 | + if (!isset($this->listOfFiles[$path])) { |
|
| 428 | 428 | $this->listOfFiles[$path] = $inFileSystem; |
| 429 | 429 | if ($this->debug) { |
| 430 | 430 | echo $inFileSystem ? '✓ ' : 'x '; |
@@ -439,7 +439,7 @@ discard block |
||
| 439 | 439 | protected function findIdFromFileName(array $data, string $filename): int |
| 440 | 440 | { |
| 441 | 441 | $id = self::findInData($data, 'FileFilename', $filename); |
| 442 | - if (! $id) { |
|
| 442 | + if (!$id) { |
|
| 443 | 443 | $id = self::findInData($data, 'Filename', $filename); |
| 444 | 444 | } |
| 445 | 445 | |
@@ -473,7 +473,7 @@ discard block |
||
| 473 | 473 | |
| 474 | 474 | $fileName = basename($absolutePath); |
| 475 | 475 | |
| 476 | - return ! ('error' === substr((string) $fileName, 0, 5) && '.html' === substr((string) $fileName, -5)); |
|
| 476 | + return !('error' === substr((string) $fileName, 0, 5) && '.html' === substr((string) $fileName, -5)); |
|
| 477 | 477 | } |
| 478 | 478 | |
| 479 | 479 | protected function getArrayOfFilesOnDisk(): array |
@@ -92,7 +92,7 @@ discard block |
||
| 92 | 92 | public function toArray(?bool $recalc = false): array |
| 93 | 93 | { |
| 94 | 94 | $cachekey = $this->getCacheKey(); |
| 95 | - if (! $this->hasCacheKey($cachekey) || $recalc) { |
|
| 95 | + if (!$this->hasCacheKey($cachekey) || $recalc) { |
|
| 96 | 96 | $this->getUncachedIntel(); |
| 97 | 97 | if ($this->debug) { |
| 98 | 98 | echo $this->intel['ErrorHasAnyError'] ? 'x ' : '✓ '; |
@@ -245,7 +245,7 @@ discard block |
||
| 245 | 245 | protected function addFolderDetails($dbFileData) |
| 246 | 246 | { |
| 247 | 247 | $folder = []; |
| 248 | - if (! empty($dbFileData['ParentID'])) { |
|
| 248 | + if (!empty($dbFileData['ParentID'])) { |
|
| 249 | 249 | if (isset($this->folderCache[$dbFileData['ParentID']])) { |
| 250 | 250 | $folder = $this->folderCache[$dbFileData['ParentID']]; |
| 251 | 251 | } else { |
@@ -258,7 +258,7 @@ discard block |
||
| 258 | 258 | } |
| 259 | 259 | |
| 260 | 260 | if (empty($folder)) { |
| 261 | - $this->intel['ErrorFindingFolder'] = ! empty($dbFileData['ParentID']); |
|
| 261 | + $this->intel['ErrorFindingFolder'] = !empty($dbFileData['ParentID']); |
|
| 262 | 262 | $this->intel['FolderID'] = 0; |
| 263 | 263 | } else { |
| 264 | 264 | $this->intel['ErrorFindingFolder'] = false; |
@@ -300,10 +300,10 @@ discard block |
||
| 300 | 300 | $this->intel['DBFilename'] = $dbFileData['Name'] ?: basename($this->intel['DBPath']); |
| 301 | 301 | $existsOnStaging = $obj->existsOnStaging($this->intel['DBID']); |
| 302 | 302 | $existsOnLive = $obj->existsOnLive($this->intel['DBID']); |
| 303 | - $this->intel['ErrorDBNotPresentStaging'] = ! $existsOnStaging; |
|
| 304 | - $this->intel['ErrorDBNotPresentLive'] = ! $existsOnLive; |
|
| 305 | - $this->intel['ErrorInDraftOnly'] = $existsOnStaging && ! $existsOnLive; |
|
| 306 | - $this->intel['ErrorNotInDraft'] = ! $existsOnStaging && $existsOnLive; |
|
| 303 | + $this->intel['ErrorDBNotPresentStaging'] = !$existsOnStaging; |
|
| 304 | + $this->intel['ErrorDBNotPresentLive'] = !$existsOnLive; |
|
| 305 | + $this->intel['ErrorInDraftOnly'] = $existsOnStaging && !$existsOnLive; |
|
| 306 | + $this->intel['ErrorNotInDraft'] = !$existsOnStaging && $existsOnLive; |
|
| 307 | 307 | $this->intel['DBCMSEditLink'] = '/admin/assets/EditForm/field/File/item/' . $this->intel['DBID'] . '/edit'; |
| 308 | 308 | $this->intel['DBTitle'] = $dbFileData['Title']; |
| 309 | 309 | $this->intel['DBFilenameSS4'] = $dbFileData['FileFilename']; |
@@ -27,7 +27,7 @@ |
||
| 27 | 27 | $absoletePath = $oneFileInfoArray['AbsolutePath']; |
| 28 | 28 | if ($oneFileInfoArray['IsDir']) { |
| 29 | 29 | DB::alteration_message('Skipping ' . $pathFromAssetsFolder . ' as this is a folder', ''); |
| 30 | - } elseif (! empty($oneFileInfoArray['IsResizedImage'])) { |
|
| 30 | + } elseif (!empty($oneFileInfoArray['IsResizedImage'])) { |
|
| 31 | 31 | if (file_exists($absoletePath)) { |
| 32 | 32 | DB::alteration_message('Deleting ' . $pathFromAssetsFolder, 'deleted'); |
| 33 | 33 | //unlink($localPath); |