@@ -33,13 +33,13 @@ |
||
| 33 | 33 | $foundNumbers = $this->documentRepository->getStatisticsForSelectedCollection($this->settings); |
| 34 | 34 | |
| 35 | 35 | // Set replacements. |
| 36 | - $args['###TITLES###'] = $foundNumbers['titles'] . ' ' . htmlspecialchars( |
|
| 36 | + $args['###TITLES###'] = $foundNumbers['titles'].' '.htmlspecialchars( |
|
| 37 | 37 | LocalizationUtility::translate( |
| 38 | 38 | ($foundNumbers['titles'] > 1 ? 'titles' : 'title'), 'dlf' |
| 39 | 39 | ) |
| 40 | 40 | ); |
| 41 | 41 | |
| 42 | - $args['###VOLUMES###'] = $foundNumbers['volumes'] . ' ' . htmlspecialchars( |
|
| 42 | + $args['###VOLUMES###'] = $foundNumbers['volumes'].' '.htmlspecialchars( |
|
| 43 | 43 | LocalizationUtility::translate( |
| 44 | 44 | ($foundNumbers['volumes'] > 1 ? 'volumes' : 'volume'), 'dlf' |
| 45 | 45 | ) |
@@ -71,7 +71,7 @@ discard block |
||
| 71 | 71 | $this->configurationToUseInTestInstance['EXTENSIONS']['dlf'] = $this->getDlfConfiguration(); |
| 72 | 72 | |
| 73 | 73 | if ($this->disableJsonWrappedResponse) { |
| 74 | - $this->frameworkExtensionsToLoad = array_filter($this->frameworkExtensionsToLoad, function ($ext) { |
|
| 74 | + $this->frameworkExtensionsToLoad = array_filter($this->frameworkExtensionsToLoad, function($ext) { |
|
| 75 | 75 | return $ext !== 'Resources/Core/Functional/Extensions/json_response'; |
| 76 | 76 | }); |
| 77 | 77 | } |
@@ -83,7 +83,7 @@ discard block |
||
| 83 | 83 | |
| 84 | 84 | $this->objectManager = GeneralUtility::makeInstance(ObjectManager::class); |
| 85 | 85 | |
| 86 | - $this->baseUrl = 'http://web:8000/public/typo3temp/var/tests/functional-' . $this->identifier . '/'; |
|
| 86 | + $this->baseUrl = 'http://web:8000/public/typo3temp/var/tests/functional-'.$this->identifier.'/'; |
|
| 87 | 87 | $this->httpClient = new HttpClient([ |
| 88 | 88 | 'base_uri' => $this->baseUrl, |
| 89 | 89 | 'http_errors' => false, |
@@ -127,13 +127,13 @@ discard block |
||
| 127 | 127 | |
| 128 | 128 | protected function addSiteConfig($identifier, $baseUrl) |
| 129 | 129 | { |
| 130 | - $siteConfig = Yaml::parseFile(__DIR__ . '/../Fixtures/siteconfig.yaml'); |
|
| 130 | + $siteConfig = Yaml::parseFile(__DIR__.'/../Fixtures/siteconfig.yaml'); |
|
| 131 | 131 | $siteConfig['base'] = $baseUrl; |
| 132 | 132 | $siteConfig['languages'][0]['base'] = $baseUrl; |
| 133 | 133 | |
| 134 | - $siteConfigPath = $this->instancePath . '/typo3conf/sites/' . $identifier; |
|
| 134 | + $siteConfigPath = $this->instancePath.'/typo3conf/sites/'.$identifier; |
|
| 135 | 135 | @mkdir($siteConfigPath, 0775, true); |
| 136 | - file_put_contents($siteConfigPath . '/config.yaml', Yaml::dump($siteConfig)); |
|
| 136 | + file_put_contents($siteConfigPath.'/config.yaml', Yaml::dump($siteConfig)); |
|
| 137 | 137 | } |
| 138 | 138 | |
| 139 | 139 | protected function initializeRepository(string $className, int $storagePid) |
@@ -152,7 +152,7 @@ discard block |
||
| 152 | 152 | $jsonDocuments = json_decode(file_get_contents($path), true); |
| 153 | 153 | |
| 154 | 154 | $updateQuery = $solr->service->createUpdate(); |
| 155 | - $documents = array_map(function ($jsonDoc) use ($updateQuery) { |
|
| 155 | + $documents = array_map(function($jsonDoc) use ($updateQuery) { |
|
| 156 | 156 | $document = $updateQuery->createDocument(); |
| 157 | 157 | foreach ($jsonDoc as $key => $value) { |
| 158 | 158 | $document->setField($key, $value); |
@@ -37,15 +37,15 @@ discard block |
||
| 37 | 37 | { |
| 38 | 38 | parent::setUp(); |
| 39 | 39 | |
| 40 | - $this->oaiUrl = $this->baseUrl . '/index.php?id=' . $this->oaiPage; |
|
| 41 | - $this->oaiUrlNoStoragePid = $this->baseUrl . '/index.php?id=' . $this->oaiPageNoStoragePid; |
|
| 40 | + $this->oaiUrl = $this->baseUrl.'/index.php?id='.$this->oaiPage; |
|
| 41 | + $this->oaiUrlNoStoragePid = $this->baseUrl.'/index.php?id='.$this->oaiPageNoStoragePid; |
|
| 42 | 42 | |
| 43 | - $this->importDataSet(__DIR__ . '/../../Fixtures/Common/documents_1.xml'); |
|
| 44 | - $this->importDataSet(__DIR__ . '/../../Fixtures/Common/metadata.xml'); |
|
| 45 | - $this->importDataSet(__DIR__ . '/../../Fixtures/Common/libraries.xml'); |
|
| 46 | - $this->importDataSet(__DIR__ . '/../../Fixtures/Common/pages.xml'); |
|
| 47 | - $this->importDataSet(__DIR__ . '/../../Fixtures/OaiPmh/pages.xml'); |
|
| 48 | - $this->importDataSet(__DIR__ . '/../../Fixtures/OaiPmh/solrcores.xml'); |
|
| 43 | + $this->importDataSet(__DIR__.'/../../Fixtures/Common/documents_1.xml'); |
|
| 44 | + $this->importDataSet(__DIR__.'/../../Fixtures/Common/metadata.xml'); |
|
| 45 | + $this->importDataSet(__DIR__.'/../../Fixtures/Common/libraries.xml'); |
|
| 46 | + $this->importDataSet(__DIR__.'/../../Fixtures/Common/pages.xml'); |
|
| 47 | + $this->importDataSet(__DIR__.'/../../Fixtures/OaiPmh/pages.xml'); |
|
| 48 | + $this->importDataSet(__DIR__.'/../../Fixtures/OaiPmh/solrcores.xml'); |
|
| 49 | 49 | |
| 50 | 50 | $this->persistenceManager = $this->objectManager->get(PersistenceManager::class); |
| 51 | 51 | $this->solrCoreRepository = $this->initializeRepository(SolrCoreRepository::class, 20000); |
@@ -62,7 +62,7 @@ discard block |
||
| 62 | 62 | $coreName = Solr::createCore(); |
| 63 | 63 | $solr = Solr::getInstance($coreName); |
| 64 | 64 | |
| 65 | - $this->importSolrDocuments($solr, __DIR__ . '/../../Fixtures/Common/documents_1.solr.json'); |
|
| 65 | + $this->importSolrDocuments($solr, __DIR__.'/../../Fixtures/Common/documents_1.solr.json'); |
|
| 66 | 66 | } |
| 67 | 67 | |
| 68 | 68 | $oaiCoreModel = $this->solrCoreRepository->findByUid(11001); |
@@ -43,9 +43,9 @@ discard block |
||
| 43 | 43 | $this->documentRepository = $this->initializeRepository(DocumentRepository::class, 20000); |
| 44 | 44 | $this->solrCoreRepository = $this->initializeRepository(SolrCoreRepository::class, 20000); |
| 45 | 45 | |
| 46 | - $this->importDataSet(__DIR__ . '/../../Fixtures/Common/documents_1.xml'); |
|
| 47 | - $this->importDataSet(__DIR__ . '/../../Fixtures/Common/libraries.xml'); |
|
| 48 | - $this->importDataSet(__DIR__ . '/../../Fixtures/Common/metadata.xml'); |
|
| 46 | + $this->importDataSet(__DIR__.'/../../Fixtures/Common/documents_1.xml'); |
|
| 47 | + $this->importDataSet(__DIR__.'/../../Fixtures/Common/libraries.xml'); |
|
| 48 | + $this->importDataSet(__DIR__.'/../../Fixtures/Common/metadata.xml'); |
|
| 49 | 49 | } |
| 50 | 50 | |
| 51 | 51 | /** |
@@ -112,9 +112,9 @@ discard block |
||
| 112 | 112 | { |
| 113 | 113 | $core = $this->createSolrCore(); |
| 114 | 114 | |
| 115 | - $this->importDataSet(__DIR__ . '/../../Fixtures/Common/documents_fulltext.xml'); |
|
| 116 | - $this->importSolrDocuments($core->solr, __DIR__ . '/../../Fixtures/Common/documents_1.solr.json'); |
|
| 117 | - $this->importSolrDocuments($core->solr, __DIR__ . '/../../Fixtures/Common/documents_fulltext.solr.json'); |
|
| 115 | + $this->importDataSet(__DIR__.'/../../Fixtures/Common/documents_fulltext.xml'); |
|
| 116 | + $this->importSolrDocuments($core->solr, __DIR__.'/../../Fixtures/Common/documents_1.solr.json'); |
|
| 117 | + $this->importSolrDocuments($core->solr, __DIR__.'/../../Fixtures/Common/documents_fulltext.solr.json'); |
|
| 118 | 118 | |
| 119 | 119 | $collections = $this->collectionRepository->findCollectionsBySettings([ |
| 120 | 120 | 'index_name' => ['Musik', 'Projekt: Dresdner Hefte'], |
@@ -146,11 +146,11 @@ discard block |
||
| 146 | 146 | $fulltext['mimetype'] = $this->document->getDoc()->getFileMimeType($this->document->getDoc()->physicalStructureInfo[$this->document->getDoc()->physicalStructure[$page]]['files'][$fileGrpFulltext]); |
| 147 | 147 | break; |
| 148 | 148 | } else { |
| 149 | - $this->logger->notice('No full-text file found for page "' . $page . '" in fileGrp "' . $fileGrpFulltext . '"'); |
|
| 149 | + $this->logger->notice('No full-text file found for page "'.$page.'" in fileGrp "'.$fileGrpFulltext.'"'); |
|
| 150 | 150 | } |
| 151 | 151 | } |
| 152 | 152 | if (empty($fulltext)) { |
| 153 | - $this->logger->notice('No full-text file found for page "' . $page . '" in fileGrps "' . $this->extConf['fileGrpFulltext'] . '"'); |
|
| 153 | + $this->logger->notice('No full-text file found for page "'.$page.'" in fileGrps "'.$this->extConf['fileGrpFulltext'].'"'); |
|
| 154 | 154 | } |
| 155 | 155 | return $fulltext; |
| 156 | 156 | } |
@@ -168,13 +168,13 @@ discard block |
||
| 168 | 168 | $viewerConfiguration = '$(document).ready(function() { |
| 169 | 169 | if (dlfUtils.exists(dlfViewer)) { |
| 170 | 170 | tx_dlf_viewer = new dlfViewer({ |
| 171 | - controls: ["' . implode('", "', $this->controls) . '"], |
|
| 172 | - div: "' . $this->settings['elementId'] . '", |
|
| 173 | - progressElementId: "' . $this->settings['progressElementId'] . '", |
|
| 174 | - images: ' . json_encode($this->images) . ', |
|
| 175 | - fulltexts: ' . json_encode($this->fulltexts) . ', |
|
| 176 | - annotationContainers: ' . json_encode($this->annotationContainers) . ', |
|
| 177 | - useInternalProxy: ' . ($this->settings['useInternalProxy'] ? 1 : 0) . ' |
|
| 171 | + controls: ["' . implode('", "', $this->controls).'"], |
|
| 172 | + div: "' . $this->settings['elementId'].'", |
|
| 173 | + progressElementId: "' . $this->settings['progressElementId'].'", |
|
| 174 | + images: ' . json_encode($this->images).', |
|
| 175 | + fulltexts: ' . json_encode($this->fulltexts).', |
|
| 176 | + annotationContainers: ' . json_encode($this->annotationContainers).', |
|
| 177 | + useInternalProxy: ' . ($this->settings['useInternalProxy'] ? 1 : 0).' |
|
| 178 | 178 | }); |
| 179 | 179 | } |
| 180 | 180 | });'; |
@@ -275,11 +275,11 @@ discard block |
||
| 275 | 275 | } |
| 276 | 276 | break; |
| 277 | 277 | } else { |
| 278 | - $this->logger->notice('No image file found for page "' . $page . '" in fileGrp "' . $fileGrpImages . '"'); |
|
| 278 | + $this->logger->notice('No image file found for page "'.$page.'" in fileGrp "'.$fileGrpImages.'"'); |
|
| 279 | 279 | } |
| 280 | 280 | } |
| 281 | 281 | if (empty($image)) { |
| 282 | - $this->logger->warning('No image file found for page "' . $page . '" in fileGrps "' . $this->extConf['fileGrpImages'] . '"'); |
|
| 282 | + $this->logger->warning('No image file found for page "'.$page.'" in fileGrps "'.$this->extConf['fileGrpImages'].'"'); |
|
| 283 | 283 | } |
| 284 | 284 | return $image; |
| 285 | 285 | } |
@@ -48,6 +48,6 @@ |
||
| 48 | 48 | $metadata['video_duration'] = [$videoDuration]; |
| 49 | 49 | } |
| 50 | 50 | |
| 51 | - $metadata['duration'] = $metadata['video_duration'] ?: $metadata['audio_duration'] ?: []; |
|
| 51 | + $metadata['duration'] = $metadata['video_duration'] ? : $metadata['audio_duration'] ? : []; |
|
| 52 | 52 | } |
| 53 | 53 | } |
@@ -217,7 +217,7 @@ discard block |
||
| 217 | 217 | $fileMimeType = $this->getFileMimeType($id); |
| 218 | 218 | $fileLocation = $this->getFileLocation($id); |
| 219 | 219 | if ($fileMimeType === 'application/vnd.kitodo.iiif') { |
| 220 | - $fileLocation = (strrpos($fileLocation, 'info.json') === strlen($fileLocation) - 9) ? $fileLocation : (strrpos($fileLocation, '/') === strlen($fileLocation) ? $fileLocation . 'info.json' : $fileLocation . '/info.json'); |
|
| 220 | + $fileLocation = (strrpos($fileLocation, 'info.json') === strlen($fileLocation) - 9) ? $fileLocation : (strrpos($fileLocation, '/') === strlen($fileLocation) ? $fileLocation.'info.json' : $fileLocation.'/info.json'); |
|
| 221 | 221 | $conf = GeneralUtility::makeInstance(ExtensionConfiguration::class)->get(self::$extKey); |
| 222 | 222 | IiifHelper::setUrlReader(IiifUrlReader::getInstance()); |
| 223 | 223 | IiifHelper::setMaxThumbnailHeight($conf['iiifThumbnailHeight']); |
@@ -227,9 +227,9 @@ discard block |
||
| 227 | 227 | return $service->getImageUrl(); |
| 228 | 228 | } |
| 229 | 229 | } elseif ($fileMimeType === 'application/vnd.netfpx') { |
| 230 | - $baseURL = $fileLocation . (strpos($fileLocation, '?') === false ? '?' : ''); |
|
| 230 | + $baseURL = $fileLocation.(strpos($fileLocation, '?') === false ? '?' : ''); |
|
| 231 | 231 | // TODO CVT is an optional IIP server capability; in theory, capabilities should be determined in the object request with '&obj=IIP-server' |
| 232 | - return $baseURL . '&CVT=jpeg'; |
|
| 232 | + return $baseURL.'&CVT=jpeg'; |
|
| 233 | 233 | } |
| 234 | 234 | return $fileLocation; |
| 235 | 235 | } |
@@ -240,14 +240,14 @@ discard block |
||
| 240 | 240 | */ |
| 241 | 241 | public function getFileLocation($id) |
| 242 | 242 | { |
| 243 | - $location = $this->mets->xpath('./mets:fileSec/mets:fileGrp/mets:file[@ID="' . $id . '"]/mets:FLocat[@LOCTYPE="URL"]'); |
|
| 243 | + $location = $this->mets->xpath('./mets:fileSec/mets:fileGrp/mets:file[@ID="'.$id.'"]/mets:FLocat[@LOCTYPE="URL"]'); |
|
| 244 | 244 | if ( |
| 245 | 245 | !empty($id) |
| 246 | 246 | && !empty($location) |
| 247 | 247 | ) { |
| 248 | 248 | return (string) $location[0]->attributes('http://www.w3.org/1999/xlink')->href; |
| 249 | 249 | } else { |
| 250 | - $this->logger->warning('There is no file node with @ID "' . $id . '"'); |
|
| 250 | + $this->logger->warning('There is no file node with @ID "'.$id.'"'); |
|
| 251 | 251 | return ''; |
| 252 | 252 | } |
| 253 | 253 | } |
@@ -258,14 +258,14 @@ discard block |
||
| 258 | 258 | */ |
| 259 | 259 | public function getFileMimeType($id) |
| 260 | 260 | { |
| 261 | - $mimetype = $this->mets->xpath('./mets:fileSec/mets:fileGrp/mets:file[@ID="' . $id . '"]/@MIMETYPE'); |
|
| 261 | + $mimetype = $this->mets->xpath('./mets:fileSec/mets:fileGrp/mets:file[@ID="'.$id.'"]/@MIMETYPE'); |
|
| 262 | 262 | if ( |
| 263 | 263 | !empty($id) |
| 264 | 264 | && !empty($mimetype) |
| 265 | 265 | ) { |
| 266 | 266 | return (string) $mimetype[0]; |
| 267 | 267 | } else { |
| 268 | - $this->logger->warning('There is no file node with @ID "' . $id . '" or no MIME type specified'); |
|
| 268 | + $this->logger->warning('There is no file node with @ID "'.$id.'" or no MIME type specified'); |
|
| 269 | 269 | return ''; |
| 270 | 270 | } |
| 271 | 271 | } |
@@ -286,7 +286,7 @@ discard block |
||
| 286 | 286 | return $this->logicalUnits[$id]; |
| 287 | 287 | } elseif (!empty($id)) { |
| 288 | 288 | // Get specified logical unit. |
| 289 | - $divs = $this->mets->xpath('./mets:structMap[@TYPE="LOGICAL"]//mets:div[@ID="' . $id . '"]'); |
|
| 289 | + $divs = $this->mets->xpath('./mets:structMap[@TYPE="LOGICAL"]//mets:div[@ID="'.$id.'"]'); |
|
| 290 | 290 | } else { |
| 291 | 291 | // Get all logical units at top level. |
| 292 | 292 | $divs = $this->mets->xpath('./mets:structMap[@TYPE="LOGICAL"]/mets:div'); |
@@ -427,7 +427,7 @@ discard block |
||
| 427 | 427 | // Retain current PID. |
| 428 | 428 | $cPid = ($this->cPid ? $this->cPid : $this->pid); |
| 429 | 429 | } elseif (!$cPid) { |
| 430 | - $this->logger->warning('Invalid PID ' . $cPid . ' for metadata definitions'); |
|
| 430 | + $this->logger->warning('Invalid PID '.$cPid.' for metadata definitions'); |
|
| 431 | 431 | return []; |
| 432 | 432 | } |
| 433 | 433 | // Get metadata from parsed metadata array if available. |
@@ -478,7 +478,7 @@ discard block |
||
| 478 | 478 | if (!empty($this->logicalUnits[$id])) { |
| 479 | 479 | $metadata['type'] = [$this->logicalUnits[$id]['type']]; |
| 480 | 480 | } else { |
| 481 | - $struct = $this->mets->xpath('./mets:structMap[@TYPE="LOGICAL"]//mets:div[@ID="' . $id . '"]/@TYPE'); |
|
| 481 | + $struct = $this->mets->xpath('./mets:structMap[@TYPE="LOGICAL"]//mets:div[@ID="'.$id.'"]/@TYPE'); |
|
| 482 | 482 | if (!empty($struct)) { |
| 483 | 483 | $metadata['type'] = [(string) $struct[0]]; |
| 484 | 484 | } |
@@ -503,11 +503,11 @@ discard block |
||
| 503 | 503 | ) { |
| 504 | 504 | $obj->extractMetadata($this->mdSec[$dmdId]['xml'], $metadata); |
| 505 | 505 | } else { |
| 506 | - $this->logger->warning('Invalid class/method "' . $class . '->extractMetadata()" for metadata format "' . $this->mdSec[$dmdId]['type'] . '"'); |
|
| 506 | + $this->logger->warning('Invalid class/method "'.$class.'->extractMetadata()" for metadata format "'.$this->mdSec[$dmdId]['type'].'"'); |
|
| 507 | 507 | } |
| 508 | 508 | } |
| 509 | 509 | } else { |
| 510 | - $this->logger->notice('Unsupported metadata format "' . $this->mdSec[$dmdId]['type'] . '" in ' . $mdSectionType . ' with @ID "' . $dmdId . '"'); |
|
| 510 | + $this->logger->notice('Unsupported metadata format "'.$this->mdSec[$dmdId]['type'].'" in '.$mdSectionType.' with @ID "'.$dmdId.'"'); |
|
| 511 | 511 | // Continue searching for supported metadata with next @DMDID. |
| 512 | 512 | continue; |
| 513 | 513 | } |
@@ -623,13 +623,13 @@ discard block |
||
| 623 | 623 | $values instanceof \DOMNodeList |
| 624 | 624 | && $values->length > 0 |
| 625 | 625 | ) { |
| 626 | - $metadata[$resArray['index_name'] . '_sorting'][0] = trim((string) $values->item(0)->nodeValue); |
|
| 626 | + $metadata[$resArray['index_name'].'_sorting'][0] = trim((string) $values->item(0)->nodeValue); |
|
| 627 | 627 | } elseif (!($values instanceof \DOMNodeList)) { |
| 628 | - $metadata[$resArray['index_name'] . '_sorting'][0] = trim((string) $values); |
|
| 628 | + $metadata[$resArray['index_name'].'_sorting'][0] = trim((string) $values); |
|
| 629 | 629 | } |
| 630 | 630 | } |
| 631 | - if (empty($metadata[$resArray['index_name'] . '_sorting'][0])) { |
|
| 632 | - $metadata[$resArray['index_name'] . '_sorting'][0] = $metadata[$resArray['index_name']][0]; |
|
| 631 | + if (empty($metadata[$resArray['index_name'].'_sorting'][0])) { |
|
| 632 | + $metadata[$resArray['index_name'].'_sorting'][0] = $metadata[$resArray['index_name']][0]; |
|
| 633 | 633 | } |
| 634 | 634 | } |
| 635 | 635 | } |
@@ -645,7 +645,7 @@ discard block |
||
| 645 | 645 | if (isset($this->fileInfos[$id]) || isset($hasMetadataSection['dmdSec'])) { |
| 646 | 646 | return $metadata; |
| 647 | 647 | } else { |
| 648 | - $this->logger->warning('No supported descriptive metadata found for logical structure with @ID "' . $id . '"'); |
|
| 648 | + $this->logger->warning('No supported descriptive metadata found for logical structure with @ID "'.$id.'"'); |
|
| 649 | 649 | return []; |
| 650 | 650 | } |
| 651 | 651 | } |
@@ -670,7 +670,7 @@ discard block |
||
| 670 | 670 | $dmdIds = $this->logicalUnits[$id]['dmdId'] ?? ''; |
| 671 | 671 | $admIds = $this->logicalUnits[$id]['admId'] ?? ''; |
| 672 | 672 | } else { |
| 673 | - $mdSec = $this->mets->xpath('./mets:structMap[@TYPE="LOGICAL"]//mets:div[@ID="' . $id . '"]')[0]; |
|
| 673 | + $mdSec = $this->mets->xpath('./mets:structMap[@TYPE="LOGICAL"]//mets:div[@ID="'.$id.'"]')[0]; |
|
| 674 | 674 | if ($mdSec) { |
| 675 | 675 | $dmdIds = (string) $mdSec->attributes()->DMDID; |
| 676 | 676 | $admIds = (string) $mdSec->attributes()->ADMID; |
@@ -698,7 +698,7 @@ discard block |
||
| 698 | 698 | } |
| 699 | 699 | } |
| 700 | 700 | |
| 701 | - return array_filter($allMdIds, function ($element) { |
|
| 701 | + return array_filter($allMdIds, function($element) { |
|
| 702 | 702 | return !empty($element); |
| 703 | 703 | }); |
| 704 | 704 | } |
@@ -725,7 +725,7 @@ discard block |
||
| 725 | 725 | */ |
| 726 | 726 | public function getStructureDepth($logId) |
| 727 | 727 | { |
| 728 | - $ancestors = $this->mets->xpath('./mets:structMap[@TYPE="LOGICAL"]//mets:div[@ID="' . $logId . '"]/ancestor::*'); |
|
| 728 | + $ancestors = $this->mets->xpath('./mets:structMap[@TYPE="LOGICAL"]//mets:div[@ID="'.$logId.'"]/ancestor::*'); |
|
| 729 | 729 | if (!empty($ancestors)) { |
| 730 | 730 | return count($ancestors); |
| 731 | 731 | } else { |
@@ -749,9 +749,9 @@ discard block |
||
| 749 | 749 | $this->registerNamespaces($this->mets); |
| 750 | 750 | } else { |
| 751 | 751 | if (!empty($location)) { |
| 752 | - $this->logger->error('No METS part found in document with location "' . $location . '".'); |
|
| 752 | + $this->logger->error('No METS part found in document with location "'.$location.'".'); |
|
| 753 | 753 | } else if (!empty($this->recordId)) { |
| 754 | - $this->logger->error('No METS part found in document with recordId "' . $this->recordId . '".'); |
|
| 754 | + $this->logger->error('No METS part found in document with recordId "'.$this->recordId.'".'); |
|
| 755 | 755 | } else { |
| 756 | 756 | $this->logger->error('No METS part found in current document.'); |
| 757 | 757 | } |
@@ -773,7 +773,7 @@ discard block |
||
| 773 | 773 | return true; |
| 774 | 774 | } |
| 775 | 775 | } |
| 776 | - $this->logger->error('Could not load XML file from "' . $location . '"'); |
|
| 776 | + $this->logger->error('Could not load XML file from "'.$location.'"'); |
|
| 777 | 777 | return false; |
| 778 | 778 | } |
| 779 | 779 | |
@@ -888,12 +888,12 @@ discard block |
||
| 888 | 888 | if ($type = $element->xpath('./mets:mdWrap[not(@MDTYPE="OTHER")]/@MDTYPE')) { |
| 889 | 889 | if (!empty($this->formats[(string) $type[0]])) { |
| 890 | 890 | $type = (string) $type[0]; |
| 891 | - $xml = $element->xpath('./mets:mdWrap[@MDTYPE="' . $type . '"]/mets:xmlData/' . strtolower($type) . ':' . $this->formats[$type]['rootElement']); |
|
| 891 | + $xml = $element->xpath('./mets:mdWrap[@MDTYPE="'.$type.'"]/mets:xmlData/'.strtolower($type).':'.$this->formats[$type]['rootElement']); |
|
| 892 | 892 | } |
| 893 | 893 | } elseif ($type = $element->xpath('./mets:mdWrap[@MDTYPE="OTHER"]/@OTHERMDTYPE')) { |
| 894 | 894 | if (!empty($this->formats[(string) $type[0]])) { |
| 895 | 895 | $type = (string) $type[0]; |
| 896 | - $xml = $element->xpath('./mets:mdWrap[@MDTYPE="OTHER"][@OTHERMDTYPE="' . $type . '"]/mets:xmlData/' . strtolower($type) . ':' . $this->formats[$type]['rootElement']); |
|
| 896 | + $xml = $element->xpath('./mets:mdWrap[@MDTYPE="OTHER"][@OTHERMDTYPE="'.$type.'"]/mets:xmlData/'.strtolower($type).':'.$this->formats[$type]['rootElement']); |
|
| 897 | 897 | } |
| 898 | 898 | } |
| 899 | 899 | |
@@ -1100,7 +1100,7 @@ discard block |
||
| 1100 | 1100 | // Retain current PID. |
| 1101 | 1101 | $cPid = ($this->cPid ? $this->cPid : $this->pid); |
| 1102 | 1102 | if (!$cPid) { |
| 1103 | - $this->logger->error('Invalid PID ' . $cPid . ' for structure definitions'); |
|
| 1103 | + $this->logger->error('Invalid PID '.$cPid.' for structure definitions'); |
|
| 1104 | 1104 | $this->thumbnailLoaded = true; |
| 1105 | 1105 | return $this->thumbnail; |
| 1106 | 1106 | } |
@@ -1137,7 +1137,7 @@ discard block |
||
| 1137 | 1137 | if (!empty($resArray['thumbnail'])) { |
| 1138 | 1138 | $strctType = Helper::getIndexNameFromUid($resArray['thumbnail'], 'tx_dlf_structures', $cPid); |
| 1139 | 1139 | // Check if this document has a structure element of the desired type. |
| 1140 | - $strctIds = $this->mets->xpath('./mets:structMap[@TYPE="LOGICAL"]//mets:div[@TYPE="' . $strctType . '"]/@ID'); |
|
| 1140 | + $strctIds = $this->mets->xpath('./mets:structMap[@TYPE="LOGICAL"]//mets:div[@TYPE="'.$strctType.'"]/@ID'); |
|
| 1141 | 1141 | if (!empty($strctIds)) { |
| 1142 | 1142 | $strctId = (string) $strctIds[0]; |
| 1143 | 1143 | } |
@@ -1160,7 +1160,7 @@ discard block |
||
| 1160 | 1160 | } |
| 1161 | 1161 | } |
| 1162 | 1162 | } else { |
| 1163 | - $this->logger->error('No structure of type "' . $metadata['type'][0] . '" found in database'); |
|
| 1163 | + $this->logger->error('No structure of type "'.$metadata['type'][0].'" found in database'); |
|
| 1164 | 1164 | } |
| 1165 | 1165 | $this->thumbnailLoaded = true; |
| 1166 | 1166 | } |
@@ -1207,7 +1207,7 @@ discard block |
||
| 1207 | 1207 | $this->parentHref = ''; |
| 1208 | 1208 | |
| 1209 | 1209 | // Get the closest ancestor of the current document which has a MPTR child. |
| 1210 | - $parentMptr = $this->mets->xpath('./mets:structMap[@TYPE="LOGICAL"]//mets:div[@ID="' . $this->toplevelId . '"]/ancestor::mets:div[./mets:mptr][1]/mets:mptr'); |
|
| 1210 | + $parentMptr = $this->mets->xpath('./mets:structMap[@TYPE="LOGICAL"]//mets:div[@ID="'.$this->toplevelId.'"]/ancestor::mets:div[./mets:mptr][1]/mets:mptr'); |
|
| 1211 | 1211 | if (!empty($parentMptr)) { |
| 1212 | 1212 | $this->parentHref = (string) $parentMptr[0]->attributes('http://www.w3.org/1999/xlink')->href; |
| 1213 | 1213 | } |
@@ -97,7 +97,7 @@ discard block |
||
| 97 | 97 | // in which case metadata of toplevel entry isn't yet filled. |
| 98 | 98 | if (empty($document['metadata'])) { |
| 99 | 99 | $document['metadata'] = $this->fetchToplevelMetadataFromSolr([ |
| 100 | - 'query' => 'uid:' . $document['uid'], |
|
| 100 | + 'query' => 'uid:'.$document['uid'], |
|
| 101 | 101 | 'start' => 0, |
| 102 | 102 | 'rows' => 1, |
| 103 | 103 | 'sort' => ['score' => 'desc'], |
@@ -108,7 +108,7 @@ discard block |
||
| 108 | 108 | if (empty($document['title']) && $document['partOf'] > 0) { |
| 109 | 109 | $superiorTitle = Doc::getTitle($document['partOf'], true); |
| 110 | 110 | if (!empty($superiorTitle)) { |
| 111 | - $document['title'] = '[' . $superiorTitle . ']'; |
|
| 111 | + $document['title'] = '['.$superiorTitle.']'; |
|
| 112 | 112 | } |
| 113 | 113 | } |
| 114 | 114 | } |
@@ -171,13 +171,13 @@ discard block |
||
| 171 | 171 | // Set search query. |
| 172 | 172 | if ( |
| 173 | 173 | (!empty($this->searchParams['fulltext'])) |
| 174 | - || preg_match('/' . $fields['fulltext'] . ':\((.*)\)/', trim($this->searchParams['query']), $matches) |
|
| 174 | + || preg_match('/'.$fields['fulltext'].':\((.*)\)/', trim($this->searchParams['query']), $matches) |
|
| 175 | 175 | ) { |
| 176 | 176 | // If the query already is a fulltext query e.g using the facets |
| 177 | 177 | $this->searchParams['query'] = empty($matches[1]) ? $this->searchParams['query'] : $matches[1]; |
| 178 | 178 | // Search in fulltext field if applicable. Query must not be empty! |
| 179 | 179 | if (!empty($this->searchParams['query'])) { |
| 180 | - $query = $fields['fulltext'] . ':(' . Solr::escapeQuery(trim($this->searchParams['query'])) . ')'; |
|
| 180 | + $query = $fields['fulltext'].':('.Solr::escapeQuery(trim($this->searchParams['query'])).')'; |
|
| 181 | 181 | } |
| 182 | 182 | $params['fulltext'] = true; |
| 183 | 183 | } else { |
@@ -200,9 +200,9 @@ discard block |
||
| 200 | 200 | in_array($this->searchParams['extOperator'][$i], $allowedOperators) |
| 201 | 201 | ) { |
| 202 | 202 | if (!empty($query)) { |
| 203 | - $query .= ' ' . $this->searchParams['extOperator'][$i] . ' '; |
|
| 203 | + $query .= ' '.$this->searchParams['extOperator'][$i].' '; |
|
| 204 | 204 | } |
| 205 | - $query .= Indexer::getIndexFieldName($this->searchParams['extField'][$i], $this->settings['storagePid']) . ':(' . Solr::escapeQuery($this->searchParams['extQuery'][$i]) . ')'; |
|
| 205 | + $query .= Indexer::getIndexFieldName($this->searchParams['extField'][$i], $this->settings['storagePid']).':('.Solr::escapeQuery($this->searchParams['extQuery'][$i]).')'; |
|
| 206 | 206 | } |
| 207 | 207 | } |
| 208 | 208 | } |
@@ -222,22 +222,22 @@ discard block |
||
| 222 | 222 | ) { |
| 223 | 223 | // Search in document and all subordinates (valid for up to three levels of hierarchy). |
| 224 | 224 | $params['filterquery'][]['query'] = '_query_:"{!join from=' |
| 225 | - . $fields['uid'] . ' to=' . $fields['partof'] . '}' |
|
| 226 | - . $fields['uid'] . ':{!join from=' . $fields['uid'] . ' to=' . $fields['partof'] . '}' |
|
| 227 | - . $fields['uid'] . ':' . $this->searchParams['documentId'] . '"' . ' OR {!join from=' |
|
| 228 | - . $fields['uid'] . ' to=' . $fields['partof'] . '}' |
|
| 229 | - . $fields['uid'] . ':' . $this->searchParams['documentId'] . ' OR ' |
|
| 230 | - . $fields['uid'] . ':' . $this->searchParams['documentId']; |
|
| 225 | + . $fields['uid'].' to='.$fields['partof'].'}' |
|
| 226 | + . $fields['uid'].':{!join from='.$fields['uid'].' to='.$fields['partof'].'}' |
|
| 227 | + . $fields['uid'].':'.$this->searchParams['documentId'].'"'.' OR {!join from=' |
|
| 228 | + . $fields['uid'].' to='.$fields['partof'].'}' |
|
| 229 | + . $fields['uid'].':'.$this->searchParams['documentId'].' OR ' |
|
| 230 | + . $fields['uid'].':'.$this->searchParams['documentId']; |
|
| 231 | 231 | } |
| 232 | 232 | |
| 233 | 233 | // if a collection is given, we prepare the collection query string |
| 234 | 234 | if ($this->collection) { |
| 235 | 235 | if ($this->collection instanceof Collection) { |
| 236 | - $collectionsQueryString = '"' . $this->collection->getIndexName() . '"'; |
|
| 236 | + $collectionsQueryString = '"'.$this->collection->getIndexName().'"'; |
|
| 237 | 237 | } else { |
| 238 | 238 | $collectionsQueryString = ''; |
| 239 | 239 | foreach ($this->collection as $index => $collectionEntry) { |
| 240 | - $collectionsQueryString .= ($index > 0 ? ' OR ' : '') . '"' . $collectionEntry->getIndexName() . '"'; |
|
| 240 | + $collectionsQueryString .= ($index > 0 ? ' OR ' : '').'"'.$collectionEntry->getIndexName().'"'; |
|
| 241 | 241 | } |
| 242 | 242 | } |
| 243 | 243 | |
@@ -245,7 +245,7 @@ discard block |
||
| 245 | 245 | $params['filterquery'][]['query'] = 'toplevel:true'; |
| 246 | 246 | $params['filterquery'][]['query'] = 'partof:0'; |
| 247 | 247 | } |
| 248 | - $params['filterquery'][]['query'] = 'collection_faceting:(' . $collectionsQueryString . ')'; |
|
| 248 | + $params['filterquery'][]['query'] = 'collection_faceting:('.$collectionsQueryString.')'; |
|
| 249 | 249 | } |
| 250 | 250 | |
| 251 | 251 | // Set some query parameters. |
@@ -272,8 +272,8 @@ discard block |
||
| 272 | 272 | if ($this->listedMetadata) { |
| 273 | 273 | foreach ($this->listedMetadata as $metadata) { |
| 274 | 274 | if ($metadata->getIndexStored() || $metadata->getIndexIndexed()) { |
| 275 | - $listMetadataRecord = $metadata->getIndexName() . '_' . ($metadata->getIndexTokenized() ? 't' : 'u') . ($metadata->getIndexStored() ? 's' : 'u') . ($metadata->getIndexIndexed() ? 'i' : 'u'); |
|
| 276 | - $params['fields'] .= ',' . $listMetadataRecord; |
|
| 275 | + $listMetadataRecord = $metadata->getIndexName().'_'.($metadata->getIndexTokenized() ? 't' : 'u').($metadata->getIndexStored() ? 's' : 'u').($metadata->getIndexIndexed() ? 'i' : 'u'); |
|
| 276 | + $params['fields'] .= ','.$listMetadataRecord; |
|
| 277 | 277 | $params['listMetadataRecords'][$metadata->getIndexName()] = $listMetadataRecord; |
| 278 | 278 | } |
| 279 | 279 | } |
@@ -351,7 +351,7 @@ discard block |
||
| 351 | 351 | $children = $childrenOf[$doc['uid']] ?? []; |
| 352 | 352 | if (!empty($children)) { |
| 353 | 353 | $metadataOf = $this->fetchToplevelMetadataFromSolr([ |
| 354 | - 'query' => 'partof:' . $doc['uid'], |
|
| 354 | + 'query' => 'partof:'.$doc['uid'], |
|
| 355 | 355 | 'start' => 0, |
| 356 | 356 | 'rows' => 100, |
| 357 | 357 | ]); |
@@ -398,8 +398,8 @@ discard block |
||
| 398 | 398 | if ($this->listedMetadata) { |
| 399 | 399 | foreach ($this->listedMetadata as $metadata) { |
| 400 | 400 | if ($metadata->getIndexStored() || $metadata->getIndexIndexed()) { |
| 401 | - $listMetadataRecord = $metadata->getIndexName() . '_' . ($metadata->getIndexTokenized() ? 't' : 'u') . ($metadata->getIndexStored() ? 's' : 'u') . ($metadata->getIndexIndexed() ? 'i' : 'u'); |
|
| 402 | - $params['fields'] .= ',' . $listMetadataRecord; |
|
| 401 | + $listMetadataRecord = $metadata->getIndexName().'_'.($metadata->getIndexTokenized() ? 't' : 'u').($metadata->getIndexStored() ? 's' : 'u').($metadata->getIndexIndexed() ? 'i' : 'u'); |
|
| 402 | + $params['fields'] .= ','.$listMetadataRecord; |
|
| 403 | 403 | $params['listMetadataRecords'][$metadata->getIndexName()] = $listMetadataRecord; |
| 404 | 404 | } |
| 405 | 405 | } |
@@ -449,7 +449,7 @@ discard block |
||
| 449 | 449 | $cache = null; |
| 450 | 450 | // Calculate cache identifier. |
| 451 | 451 | if ($enableCache === true) { |
| 452 | - $cacheIdentifier = Helper::digest($solr->core . print_r($parameters, true)); |
|
| 452 | + $cacheIdentifier = Helper::digest($solr->core.print_r($parameters, true)); |
|
| 453 | 453 | $cache = GeneralUtility::makeInstance(CacheManager::class)->getCache('tx_dlf_solr'); |
| 454 | 454 | } |
| 455 | 455 | $resultSet = [ |
@@ -143,7 +143,7 @@ discard block |
||
| 143 | 143 | if (!preg_match('/[0-9]{8}-[0-9]{1}/i', $id)) { |
| 144 | 144 | return false; |
| 145 | 145 | } elseif ($checksum == 10) { |
| 146 | - return self::checkIdentifier(($digits + 1) . substr($id, -2, 2), 'SWD'); |
|
| 146 | + return self::checkIdentifier(($digits + 1).substr($id, -2, 2), 'SWD'); |
|
| 147 | 147 | } elseif (substr($id, -1, 1) != $checksum) { |
| 148 | 148 | return false; |
| 149 | 149 | } |
@@ -315,7 +315,7 @@ discard block |
||
| 315 | 315 | $encrypted = openssl_encrypt($string, self::$cipherAlgorithm, $key, OPENSSL_RAW_DATA, $iv); |
| 316 | 316 | // Merge initialisation vector and encrypted data. |
| 317 | 317 | if ($encrypted !== false) { |
| 318 | - $encrypted = base64_encode($iv . $encrypted); |
|
| 318 | + $encrypted = base64_encode($iv.$encrypted); |
|
| 319 | 319 | } |
| 320 | 320 | return $encrypted; |
| 321 | 321 | } |
@@ -369,8 +369,8 @@ discard block |
||
| 369 | 369 | public static function getHookObjects($scriptRelPath) |
| 370 | 370 | { |
| 371 | 371 | $hookObjects = []; |
| 372 | - if (is_array($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS'][self::$extKey . '/' . $scriptRelPath]['hookClass'])) { |
|
| 373 | - foreach ($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS'][self::$extKey . '/' . $scriptRelPath]['hookClass'] as $classRef) { |
|
| 372 | + if (is_array($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS'][self::$extKey.'/'.$scriptRelPath]['hookClass'])) { |
|
| 373 | + foreach ($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS'][self::$extKey.'/'.$scriptRelPath]['hookClass'] as $classRef) { |
|
| 374 | 374 | $hookObjects[] = GeneralUtility::makeInstance($classRef); |
| 375 | 375 | } |
| 376 | 376 | } |
@@ -397,12 +397,12 @@ discard block |
||
| 397 | 397 | // NOTE: Only use tables that don't have too many entries! |
| 398 | 398 | || !in_array($table, ['tx_dlf_collections', 'tx_dlf_libraries', 'tx_dlf_metadata', 'tx_dlf_structures', 'tx_dlf_solrcores']) |
| 399 | 399 | ) { |
| 400 | - self::log('Invalid UID "' . $uid . '" or table "' . $table . '"', LOG_SEVERITY_ERROR); |
|
| 400 | + self::log('Invalid UID "'.$uid.'" or table "'.$table.'"', LOG_SEVERITY_ERROR); |
|
| 401 | 401 | return ''; |
| 402 | 402 | } |
| 403 | 403 | |
| 404 | - $makeCacheKey = function ($pid, $uid) { |
|
| 405 | - return $pid . '.' . $uid; |
|
| 404 | + $makeCacheKey = function($pid, $uid) { |
|
| 405 | + return $pid.'.'.$uid; |
|
| 406 | 406 | }; |
| 407 | 407 | |
| 408 | 408 | static $cache = []; |
@@ -412,9 +412,9 @@ discard block |
||
| 412 | 412 | |
| 413 | 413 | $result = $queryBuilder |
| 414 | 414 | ->select( |
| 415 | - $table . '.index_name AS index_name', |
|
| 416 | - $table . '.uid AS uid', |
|
| 417 | - $table . '.pid AS pid', |
|
| 415 | + $table.'.index_name AS index_name', |
|
| 416 | + $table.'.uid AS uid', |
|
| 417 | + $table.'.pid AS pid', |
|
| 418 | 418 | ) |
| 419 | 419 | ->from($table) |
| 420 | 420 | ->execute(); |
@@ -432,7 +432,7 @@ discard block |
||
| 432 | 432 | $result = $cache[$table][$cacheKey] ?? ''; |
| 433 | 433 | |
| 434 | 434 | if ($result === '') { |
| 435 | - self::log('No "index_name" with UID ' . $uid . ' and PID ' . $pid . ' found in table "' . $table . '"', LOG_SEVERITY_WARNING); |
|
| 435 | + self::log('No "index_name" with UID '.$uid.' and PID '.$pid.' found in table "'.$table.'"', LOG_SEVERITY_WARNING); |
|
| 436 | 436 | } |
| 437 | 437 | |
| 438 | 438 | return $result; |
@@ -459,11 +459,11 @@ discard block |
||
| 459 | 459 | // No ISO code, return unchanged. |
| 460 | 460 | return $code; |
| 461 | 461 | } |
| 462 | - $lang = LocalizationUtility::translate('LLL:' . $file . ':' . $code); |
|
| 462 | + $lang = LocalizationUtility::translate('LLL:'.$file.':'.$code); |
|
| 463 | 463 | if (!empty($lang)) { |
| 464 | 464 | return $lang; |
| 465 | 465 | } else { |
| 466 | - self::log('Language code "' . $code . '" not found in ISO-639 table', LOG_SEVERITY_NOTICE); |
|
| 466 | + self::log('Language code "'.$code.'" not found in ISO-639 table', LOG_SEVERITY_NOTICE); |
|
| 467 | 467 | return $code; |
| 468 | 468 | } |
| 469 | 469 | } |
@@ -560,7 +560,7 @@ discard block |
||
| 560 | 560 | '-' => 39, |
| 561 | 561 | ':' => 17, |
| 562 | 562 | ]; |
| 563 | - $urn = strtolower($base . $id); |
|
| 563 | + $urn = strtolower($base.$id); |
|
| 564 | 564 | if (preg_match('/[^a-z0-9:-]/', $urn)) { |
| 565 | 565 | self::log('Invalid chars in given parameters', LOG_SEVERITY_WARNING); |
| 566 | 566 | return ''; |
@@ -574,7 +574,7 @@ discard block |
||
| 574 | 574 | $checksum += ($i + 1) * intval(substr($digits, $i, 1)); |
| 575 | 575 | } |
| 576 | 576 | $checksum = substr(intval($checksum / intval(substr($digits, -1, 1))), -1, 1); |
| 577 | - return $base . $id . $checksum; |
|
| 577 | + return $base.$id.$checksum; |
|
| 578 | 578 | } |
| 579 | 579 | |
| 580 | 580 | /** |
@@ -668,7 +668,7 @@ discard block |
||
| 668 | 668 | // Sanitize input. |
| 669 | 669 | $pid = max(intval($pid), 0); |
| 670 | 670 | if (!$pid) { |
| 671 | - self::log('Invalid PID ' . $pid . ' for translation', LOG_SEVERITY_WARNING); |
|
| 671 | + self::log('Invalid PID '.$pid.' for translation', LOG_SEVERITY_WARNING); |
|
| 672 | 672 | return $index_name; |
| 673 | 673 | } |
| 674 | 674 | /** @var \TYPO3\CMS\Frontend\Page\PageRepository $pageRepository */ |
@@ -690,13 +690,13 @@ discard block |
||
| 690 | 690 | // First fetch the uid of the received index_name |
| 691 | 691 | $result = $queryBuilder |
| 692 | 692 | ->select( |
| 693 | - $table . '.uid AS uid', |
|
| 694 | - $table . '.l18n_parent AS l18n_parent' |
|
| 693 | + $table.'.uid AS uid', |
|
| 694 | + $table.'.l18n_parent AS l18n_parent' |
|
| 695 | 695 | ) |
| 696 | 696 | ->from($table) |
| 697 | 697 | ->where( |
| 698 | - $queryBuilder->expr()->eq($table . '.pid', $pid), |
|
| 699 | - $queryBuilder->expr()->eq($table . '.index_name', $queryBuilder->expr()->literal($index_name)), |
|
| 698 | + $queryBuilder->expr()->eq($table.'.pid', $pid), |
|
| 699 | + $queryBuilder->expr()->eq($table.'.index_name', $queryBuilder->expr()->literal($index_name)), |
|
| 700 | 700 | self::whereExpression($table, true) |
| 701 | 701 | ) |
| 702 | 702 | ->setMaxResults(1) |
@@ -709,12 +709,12 @@ discard block |
||
| 709 | 709 | $resArray = $allResults[0]; |
| 710 | 710 | |
| 711 | 711 | $result = $queryBuilder |
| 712 | - ->select($table . '.index_name AS index_name') |
|
| 712 | + ->select($table.'.index_name AS index_name') |
|
| 713 | 713 | ->from($table) |
| 714 | 714 | ->where( |
| 715 | - $queryBuilder->expr()->eq($table . '.pid', $pid), |
|
| 716 | - $queryBuilder->expr()->eq($table . '.uid', $resArray['l18n_parent']), |
|
| 717 | - $queryBuilder->expr()->eq($table . '.sys_language_uid', intval($languageAspect->getContentId())), |
|
| 715 | + $queryBuilder->expr()->eq($table.'.pid', $pid), |
|
| 716 | + $queryBuilder->expr()->eq($table.'.uid', $resArray['l18n_parent']), |
|
| 717 | + $queryBuilder->expr()->eq($table.'.sys_language_uid', intval($languageAspect->getContentId())), |
|
| 718 | 718 | self::whereExpression($table, true) |
| 719 | 719 | ) |
| 720 | 720 | ->setMaxResults(1) |
@@ -732,14 +732,14 @@ discard block |
||
| 732 | 732 | if (empty($labels[$table][$pid][$languageAspect->getContentId()][$index_name])) { |
| 733 | 733 | // Check if this table is allowed for translation. |
| 734 | 734 | if (in_array($table, ['tx_dlf_collections', 'tx_dlf_libraries', 'tx_dlf_metadata', 'tx_dlf_structures'])) { |
| 735 | - $additionalWhere = $queryBuilder->expr()->in($table . '.sys_language_uid', [-1, 0]); |
|
| 735 | + $additionalWhere = $queryBuilder->expr()->in($table.'.sys_language_uid', [-1, 0]); |
|
| 736 | 736 | if ($languageAspect->getContentId() > 0) { |
| 737 | 737 | $additionalWhere = $queryBuilder->expr()->andX( |
| 738 | 738 | $queryBuilder->expr()->orX( |
| 739 | - $queryBuilder->expr()->in($table . '.sys_language_uid', [-1, 0]), |
|
| 740 | - $queryBuilder->expr()->eq($table . '.sys_language_uid', intval($languageAspect->getContentId())) |
|
| 739 | + $queryBuilder->expr()->in($table.'.sys_language_uid', [-1, 0]), |
|
| 740 | + $queryBuilder->expr()->eq($table.'.sys_language_uid', intval($languageAspect->getContentId())) |
|
| 741 | 741 | ), |
| 742 | - $queryBuilder->expr()->eq($table . '.l18n_parent', 0) |
|
| 742 | + $queryBuilder->expr()->eq($table.'.l18n_parent', 0) |
|
| 743 | 743 | ); |
| 744 | 744 | } |
| 745 | 745 | |
@@ -748,7 +748,7 @@ discard block |
||
| 748 | 748 | ->select('*') |
| 749 | 749 | ->from($table) |
| 750 | 750 | ->where( |
| 751 | - $queryBuilder->expr()->eq($table . '.pid', $pid), |
|
| 751 | + $queryBuilder->expr()->eq($table.'.pid', $pid), |
|
| 752 | 752 | $additionalWhere, |
| 753 | 753 | self::whereExpression($table, true) |
| 754 | 754 | ) |
@@ -766,10 +766,10 @@ discard block |
||
| 766 | 766 | } |
| 767 | 767 | } |
| 768 | 768 | } else { |
| 769 | - self::log('No translation with PID ' . $pid . ' available in table "' . $table . '" or translation not accessible', LOG_SEVERITY_NOTICE); |
|
| 769 | + self::log('No translation with PID '.$pid.' available in table "'.$table.'" or translation not accessible', LOG_SEVERITY_NOTICE); |
|
| 770 | 770 | } |
| 771 | 771 | } else { |
| 772 | - self::log('No translations available for table "' . $table . '"', LOG_SEVERITY_WARNING); |
|
| 772 | + self::log('No translations available for table "'.$table.'"', LOG_SEVERITY_WARNING); |
|
| 773 | 773 | } |
| 774 | 774 | } |
| 775 | 775 | |
@@ -811,9 +811,9 @@ discard block |
||
| 811 | 811 | return GeneralUtility::makeInstance(ConnectionPool::class) |
| 812 | 812 | ->getQueryBuilderForTable($table) |
| 813 | 813 | ->expr() |
| 814 | - ->eq($table . '.' . $GLOBALS['TCA'][$table]['ctrl']['delete'], 0); |
|
| 814 | + ->eq($table.'.'.$GLOBALS['TCA'][$table]['ctrl']['delete'], 0); |
|
| 815 | 815 | } else { |
| 816 | - self::log('Unexpected TYPO3_MODE "' . \TYPO3_MODE . '"', LOG_SEVERITY_ERROR); |
|
| 816 | + self::log('Unexpected TYPO3_MODE "'.\TYPO3_MODE.'"', LOG_SEVERITY_ERROR); |
|
| 817 | 817 | return '1=-1'; |
| 818 | 818 | } |
| 819 | 819 | } |
@@ -852,7 +852,7 @@ discard block |
||
| 852 | 852 | */ |
| 853 | 853 | public static function polyfillExtbaseClassesForTYPO3v9() |
| 854 | 854 | { |
| 855 | - $classes = require __DIR__ . '/../../Configuration/Extbase/Persistence/Classes.php'; |
|
| 855 | + $classes = require __DIR__.'/../../Configuration/Extbase/Persistence/Classes.php'; |
|
| 856 | 856 | |
| 857 | 857 | $objectManager = GeneralUtility::makeInstance(ObjectManager::class); |
| 858 | 858 | $configurationManager = $objectManager->get(ConfigurationManager::class); |
@@ -908,10 +908,10 @@ discard block |
||
| 908 | 908 | try { |
| 909 | 909 | $response = $requestFactory->request($url, 'GET', $configuration); |
| 910 | 910 | } catch (\Exception $e) { |
| 911 | - self::log('Could not fetch data from URL "' . $url . '". Error: ' . $e->getMessage() . '.', LOG_SEVERITY_WARNING); |
|
| 911 | + self::log('Could not fetch data from URL "'.$url.'". Error: '.$e->getMessage().'.', LOG_SEVERITY_WARNING); |
|
| 912 | 912 | return false; |
| 913 | 913 | } |
| 914 | - $content = $response->getBody()->getContents(); |
|
| 914 | + $content = $response->getBody()->getContents(); |
|
| 915 | 915 | |
| 916 | 916 | return $content; |
| 917 | 917 | } |