@@ -161,7 +161,7 @@ discard block |
||
| 161 | 161 | |
| 162 | 162 | // Add uHash parameter to suggest parameter to make a basic protection of this form. |
| 163 | 163 | if ($this->settings['suggest']) { |
| 164 | - $this->view->assign('uHash', GeneralUtility::hmac((string) (new Typo3Version()) . Environment::getExtensionsPath(), 'SearchSuggest')); |
|
| 164 | + $this->view->assign('uHash', GeneralUtility::hmac((string) (new Typo3Version()).Environment::getExtensionsPath(), 'SearchSuggest')); |
|
| 165 | 165 | } |
| 166 | 166 | } |
| 167 | 167 | |
@@ -182,7 +182,7 @@ discard block |
||
| 182 | 182 | // Get facets from plugin configuration. |
| 183 | 183 | $facets = []; |
| 184 | 184 | foreach (GeneralUtility::trimExplode(',', $this->settings['facets'], true) as $facet) { |
| 185 | - $facets[$facet . '_faceting'] = Helper::translate($facet, 'tx_dlf_metadata', $this->settings['storagePid']); |
|
| 185 | + $facets[$facet.'_faceting'] = Helper::translate($facet, 'tx_dlf_metadata', $this->settings['storagePid']); |
|
| 186 | 186 | } |
| 187 | 187 | |
| 188 | 188 | $this->view->assign('facetsMenu', $this->makeFacetsMenuArray($facets)); |
@@ -223,13 +223,13 @@ discard block |
||
| 223 | 223 | $searchParams = $this->searchParams; |
| 224 | 224 | if ( |
| 225 | 225 | (!empty($searchParams['fulltext'])) |
| 226 | - || preg_match('/' . $fields['fulltext'] . ':\((.*)\)/', trim($searchParams['query']), $matches) |
|
| 226 | + || preg_match('/'.$fields['fulltext'].':\((.*)\)/', trim($searchParams['query']), $matches) |
|
| 227 | 227 | ) { |
| 228 | 228 | // If the query already is a fulltext query e.g using the facets |
| 229 | 229 | $searchParams['query'] = empty($matches[1]) ? $searchParams['query'] : $matches[1]; |
| 230 | 230 | // Search in fulltext field if applicable. Query must not be empty! |
| 231 | 231 | if (!empty($this->searchParams['query'])) { |
| 232 | - $search['query'] = $fields['fulltext'] . ':(' . Solr::escapeQuery(trim($searchParams['query'])) . ')'; |
|
| 232 | + $search['query'] = $fields['fulltext'].':('.Solr::escapeQuery(trim($searchParams['query'])).')'; |
|
| 233 | 233 | } |
| 234 | 234 | } else { |
| 235 | 235 | // Retain given search field if valid. |
@@ -251,9 +251,9 @@ discard block |
||
| 251 | 251 | in_array($searchParams['extOperator'][$i], $allowedOperators) |
| 252 | 252 | ) { |
| 253 | 253 | if (!empty($search['query'])) { |
| 254 | - $search['query'] .= ' ' . $searchParams['extOperator'][$i] . ' '; |
|
| 254 | + $search['query'] .= ' '.$searchParams['extOperator'][$i].' '; |
|
| 255 | 255 | } |
| 256 | - $search['query'] .= Indexer::getIndexFieldName($searchParams['extField'][$i], $this->settings['storagePid']) . ':(' . Solr::escapeQuery($searchParams['extQuery'][$i]) . ')'; |
|
| 256 | + $search['query'] .= Indexer::getIndexFieldName($searchParams['extField'][$i], $this->settings['storagePid']).':('.Solr::escapeQuery($searchParams['extQuery'][$i]).')'; |
|
| 257 | 257 | } |
| 258 | 258 | } |
| 259 | 259 | } |
@@ -378,7 +378,7 @@ discard block |
||
| 378 | 378 | $entryArray['doNotLinkIt'] = 0; |
| 379 | 379 | // Check if facet is already selected. |
| 380 | 380 | $queryColumn = array_column($search['params']['filterquery'], 'query'); |
| 381 | - $index = array_search($field . ':("' . Solr::escapeQuery($value) . '")', $queryColumn); |
|
| 381 | + $index = array_search($field.':("'.Solr::escapeQuery($value).'")', $queryColumn); |
|
| 382 | 382 | if ($index !== false) { |
| 383 | 383 | // Facet is selected, thus remove it from filter. |
| 384 | 384 | unset($queryColumn[$index]); |
@@ -392,7 +392,7 @@ discard block |
||
| 392 | 392 | } |
| 393 | 393 | } else { |
| 394 | 394 | // Facet is not selected, thus add it to filter. |
| 395 | - $queryColumn[] = $field . ':("' . Solr::escapeQuery($value) . '")'; |
|
| 395 | + $queryColumn[] = $field.':("'.Solr::escapeQuery($value).'")'; |
|
| 396 | 396 | $entryArray['ITEM_STATE'] = 'NO'; |
| 397 | 397 | } |
| 398 | 398 | $entryArray['queryColumn'] = $queryColumn; |
@@ -96,14 +96,14 @@ |
||
| 96 | 96 | foreach ($collections as $collection) { |
| 97 | 97 | $solr_query = ''; |
| 98 | 98 | if ($collection->getIndexSearch() != '') { |
| 99 | - $solr_query .= '(' . $collection->getIndexSearch() . ')'; |
|
| 99 | + $solr_query .= '('.$collection->getIndexSearch().')'; |
|
| 100 | 100 | } else { |
| 101 | - $solr_query .= 'collection:("' . Solr::escapeQuery($collection->getIndexName()) . '")'; |
|
| 101 | + $solr_query .= 'collection:("'.Solr::escapeQuery($collection->getIndexName()).'")'; |
|
| 102 | 102 | } |
| 103 | - $params['query'] = $solr_query . ' AND partof:0 AND toplevel:true'; |
|
| 103 | + $params['query'] = $solr_query.' AND partof:0 AND toplevel:true'; |
|
| 104 | 104 | $partOfNothing = $solr->search_raw($params); |
| 105 | 105 | |
| 106 | - $params['query'] = $solr_query . ' AND NOT partof:0 AND toplevel:true'; |
|
| 106 | + $params['query'] = $solr_query.' AND NOT partof:0 AND toplevel:true'; |
|
| 107 | 107 | $partOfSomething = $solr->search_raw($params); |
| 108 | 108 | // Titles are all documents that are "root" elements i.e. partof == 0 |
| 109 | 109 | $collectionInfo['titles'] = []; |
@@ -52,12 +52,12 @@ |
||
| 52 | 52 | $(document).ready(function() { |
| 53 | 53 | AudioPlayer = new dlfAudioPlayer({ |
| 54 | 54 | audio: { |
| 55 | - mimeType: "' . $this->audio['mimetype'] . '", |
|
| 56 | - title: "' . $this->audio['label'] . '", |
|
| 57 | - url: "' . $this->audio['url'] . '" |
|
| 55 | + mimeType: "' . $this->audio['mimetype'].'", |
|
| 56 | + title: "' . $this->audio['label'].'", |
|
| 57 | + url: "' . $this->audio['url'].'" |
|
| 58 | 58 | }, |
| 59 | 59 | parentElId: "tx-dlf-audio", |
| 60 | - swfPath: "' . PathUtility::stripPathSitePrefix(ExtensionManagementUtility::extPath('dlf')) . 'Resources/Public/Javascript/jPlayer/jquery.jplayer.swf" |
|
| 60 | + swfPath: "' . PathUtility::stripPathSitePrefix(ExtensionManagementUtility::extPath('dlf')).'Resources/Public/Javascript/jPlayer/jquery.jplayer.swf" |
|
| 61 | 61 | }); |
| 62 | 62 | }); |
| 63 | 63 | '; |
@@ -155,7 +155,7 @@ discard block |
||
| 155 | 155 | array_unshift($metadata, $data); |
| 156 | 156 | } |
| 157 | 157 | if (empty($metadata)) { |
| 158 | - $this->logger->warning('No metadata found for document with UID ' . $this->document->getUid()); |
|
| 158 | + $this->logger->warning('No metadata found for document with UID '.$this->document->getUid()); |
|
| 159 | 159 | return ''; |
| 160 | 160 | } |
| 161 | 161 | ksort($metadata); |
@@ -255,7 +255,7 @@ discard block |
||
| 255 | 255 | if (empty($metadataValue) && $this->settings['getTitle'] && $this->document->getDoc()->parentId) { |
| 256 | 256 | $superiorTitle = Doc::getTitle($this->document->getPartof(), true); |
| 257 | 257 | if (!empty($superiorTitle)) { |
| 258 | - $metadataArray[$i][$metadataName] = ['[' . $superiorTitle . ']']; |
|
| 258 | + $metadataArray[$i][$metadataName] = ['['.$superiorTitle.']']; |
|
| 259 | 259 | } |
| 260 | 260 | } |
| 261 | 261 | if (!empty($metadataValue)) { |
@@ -158,7 +158,7 @@ discard block |
||
| 158 | 158 | public function addFormatAction() |
| 159 | 159 | { |
| 160 | 160 | // Include formats definition file. |
| 161 | - $formatsDefaults = include(ExtensionManagementUtility::extPath('dlf') . 'Resources/Private/Data/FormatDefaults.php'); |
|
| 161 | + $formatsDefaults = include(ExtensionManagementUtility::extPath('dlf').'Resources/Private/Data/FormatDefaults.php'); |
|
| 162 | 162 | |
| 163 | 163 | $frameworkConfiguration = $this->configurationManager->getConfiguration($this->configurationManager::CONFIGURATION_TYPE_FRAMEWORK); |
| 164 | 164 | // tx_dlf_formats are stored on PID = 0 |
@@ -196,7 +196,7 @@ discard block |
||
| 196 | 196 | public function addMetadataAction() |
| 197 | 197 | { |
| 198 | 198 | // Include metadata definition file. |
| 199 | - $metadataDefaults = include(ExtensionManagementUtility::extPath('dlf') . 'Resources/Private/Data/MetadataDefaults.php'); |
|
| 199 | + $metadataDefaults = include(ExtensionManagementUtility::extPath('dlf').'Resources/Private/Data/MetadataDefaults.php'); |
|
| 200 | 200 | |
| 201 | 201 | $doPersist = false; |
| 202 | 202 | |
@@ -208,7 +208,7 @@ discard block |
||
| 208 | 208 | if ($this->metadataRepository->findOneByIndexName($indexName) === null) { |
| 209 | 209 | |
| 210 | 210 | $newRecord = GeneralUtility::makeInstance(Metadata::class); |
| 211 | - $newRecord->setLabel($this->getLLL('metadata.' . $indexName, $this->siteLanguages[0]->getTypo3Language(), $metadataLabels)); |
|
| 211 | + $newRecord->setLabel($this->getLLL('metadata.'.$indexName, $this->siteLanguages[0]->getTypo3Language(), $metadataLabels)); |
|
| 212 | 212 | $newRecord->setIndexName($indexName); |
| 213 | 213 | $newRecord->setDefaultValue($values['default_value']); |
| 214 | 214 | $newRecord->setWrap($values['wrap'] ? : $GLOBALS['TCA']['tx_dlf_metadata']['columns']['wrap']['config']['default']); |
@@ -243,7 +243,7 @@ discard block |
||
| 243 | 243 | $translatedRecord = GeneralUtility::makeInstance(Metadata::class); |
| 244 | 244 | $translatedRecord->setL18nParent($newRecord); |
| 245 | 245 | $translatedRecord->_setProperty('_languageUid', $siteLanguage->getLanguageId()); |
| 246 | - $translatedRecord->setLabel($this->getLLL('metadata.' . $indexName, $siteLanguage->getTypo3Language(), $metadataLabels)); |
|
| 246 | + $translatedRecord->setLabel($this->getLLL('metadata.'.$indexName, $siteLanguage->getTypo3Language(), $metadataLabels)); |
|
| 247 | 247 | $translatedRecord->setIndexName($indexName); |
| 248 | 248 | $translatedRecord->setWrap($newRecord->getWrap()); |
| 249 | 249 | |
@@ -277,7 +277,7 @@ discard block |
||
| 277 | 277 | |
| 278 | 278 | if ($this->solrCoreRepository->findOneByPid($this->pid) === null) { |
| 279 | 279 | $newRecord = GeneralUtility::makeInstance(SolrCore::class); |
| 280 | - $newRecord->setLabel($this->getLLL('flexform.solrcore', $this->siteLanguages[0]->getTypo3Language(), $beLabels). ' (PID ' . $this->pid . ')'); |
|
| 280 | + $newRecord->setLabel($this->getLLL('flexform.solrcore', $this->siteLanguages[0]->getTypo3Language(), $beLabels).' (PID '.$this->pid.')'); |
|
| 281 | 281 | $indexName = Solr::createCore(''); |
| 282 | 282 | $newRecord->setIndexName($indexName); |
| 283 | 283 | |
@@ -301,7 +301,7 @@ discard block |
||
| 301 | 301 | public function addStructureAction() |
| 302 | 302 | { |
| 303 | 303 | // Include structure definition file. |
| 304 | - $structureDefaults = include(ExtensionManagementUtility::extPath('dlf') . 'Resources/Private/Data/StructureDefaults.php'); |
|
| 304 | + $structureDefaults = include(ExtensionManagementUtility::extPath('dlf').'Resources/Private/Data/StructureDefaults.php'); |
|
| 305 | 305 | |
| 306 | 306 | $doPersist = false; |
| 307 | 307 | |
@@ -312,7 +312,7 @@ discard block |
||
| 312 | 312 | // if default format record is not found, add it to the repository |
| 313 | 313 | if ($this->structureRepository->findOneByIndexName($indexName) === null) { |
| 314 | 314 | $newRecord = GeneralUtility::makeInstance(Structure::class); |
| 315 | - $newRecord->setLabel($this->getLLL('structure.' . $indexName, $this->siteLanguages[0]->getTypo3Language(), $structLabels)); |
|
| 315 | + $newRecord->setLabel($this->getLLL('structure.'.$indexName, $this->siteLanguages[0]->getTypo3Language(), $structLabels)); |
|
| 316 | 316 | $newRecord->setIndexName($indexName); |
| 317 | 317 | $newRecord->setToplevel($values['toplevel']); |
| 318 | 318 | $newRecord->setOaiName($values['oai_name']); |
@@ -326,7 +326,7 @@ discard block |
||
| 326 | 326 | $translatedRecord = GeneralUtility::makeInstance(Structure::class); |
| 327 | 327 | $translatedRecord->setL18nParent($newRecord); |
| 328 | 328 | $translatedRecord->_setProperty('_languageUid', $siteLanguage->getLanguageId()); |
| 329 | - $translatedRecord->setLabel($this->getLLL('structure.' . $indexName, $siteLanguage->getTypo3Language(), $structLabels)); |
|
| 329 | + $translatedRecord->setLabel($this->getLLL('structure.'.$indexName, $siteLanguage->getTypo3Language(), $structLabels)); |
|
| 330 | 330 | $translatedRecord->setIndexName($indexName); |
| 331 | 331 | |
| 332 | 332 | $this->structureRepository->add($translatedRecord); |
@@ -378,15 +378,15 @@ discard block |
||
| 378 | 378 | $this->forward('error'); |
| 379 | 379 | } |
| 380 | 380 | |
| 381 | - $formatsDefaults = include(ExtensionManagementUtility::extPath('dlf') . 'Resources/Private/Data/FormatDefaults.php'); |
|
| 381 | + $formatsDefaults = include(ExtensionManagementUtility::extPath('dlf').'Resources/Private/Data/FormatDefaults.php'); |
|
| 382 | 382 | $recordInfos['formats']['numCurrent'] = $this->formatRepository->countAll(); |
| 383 | 383 | $recordInfos['formats']['numDefault'] = count($formatsDefaults); |
| 384 | 384 | |
| 385 | - $structuresDefaults = include(ExtensionManagementUtility::extPath('dlf') . 'Resources/Private/Data/StructureDefaults.php'); |
|
| 385 | + $structuresDefaults = include(ExtensionManagementUtility::extPath('dlf').'Resources/Private/Data/StructureDefaults.php'); |
|
| 386 | 386 | $recordInfos['structures']['numCurrent'] = $this->structureRepository->countByPid($this->pid); |
| 387 | 387 | $recordInfos['structures']['numDefault'] = count($structuresDefaults); |
| 388 | 388 | |
| 389 | - $metadataDefaults = include(ExtensionManagementUtility::extPath('dlf') . 'Resources/Private/Data/MetadataDefaults.php'); |
|
| 389 | + $metadataDefaults = include(ExtensionManagementUtility::extPath('dlf').'Resources/Private/Data/MetadataDefaults.php'); |
|
| 390 | 390 | $recordInfos['metadata']['numCurrent'] = $this->metadataRepository->countByPid($this->pid); |
| 391 | 391 | $recordInfos['metadata']['numDefault'] = count($metadataDefaults); |
| 392 | 392 | |
@@ -253,7 +253,7 @@ discard block |
||
| 253 | 253 | $image['mimetypeLabel'] = $mimetypeLabel; |
| 254 | 254 | break; |
| 255 | 255 | } else { |
| 256 | - $this->logger->warning('File not found in fileGrp "' . $fileGrp . '"'); |
|
| 256 | + $this->logger->warning('File not found in fileGrp "'.$fileGrp.'"'); |
|
| 257 | 257 | } |
| 258 | 258 | } |
| 259 | 259 | return $image; |
@@ -344,7 +344,7 @@ discard block |
||
| 344 | 344 | empty($page1Link) |
| 345 | 345 | && empty($page2Link) |
| 346 | 346 | ) { |
| 347 | - $this->logger->warning('File not found in fileGrps "' . $this->extConf['fileGrpDownload'] . '"'); |
|
| 347 | + $this->logger->warning('File not found in fileGrps "'.$this->extConf['fileGrpDownload'].'"'); |
|
| 348 | 348 | } |
| 349 | 349 | |
| 350 | 350 | if (!empty($page1Link)) { |
@@ -383,7 +383,7 @@ discard block |
||
| 383 | 383 | if (!empty($workLink)) { |
| 384 | 384 | $workLink = $workLink; |
| 385 | 385 | } else { |
| 386 | - $this->logger->warning('File not found in fileGrps "' . $this->extConf['fileGrpDownload'] . '"'); |
|
| 386 | + $this->logger->warning('File not found in fileGrps "'.$this->extConf['fileGrpDownload'].'"'); |
|
| 387 | 387 | } |
| 388 | 388 | return $workLink; |
| 389 | 389 | } |
@@ -74,7 +74,7 @@ |
||
| 74 | 74 | |
| 75 | 75 | $pageOptions = []; |
| 76 | 76 | for ($i = 1; $i <= $this->document->getDoc()->numPages; $i++) { |
| 77 | - $pageOptions[$i] = '[' . $i . ']' . ($this->document->getDoc()->physicalStructureInfo[$this->document->getDoc()->physicalStructure[$i]]['orderlabel'] ? ' - ' . htmlspecialchars($this->document->getDoc()->physicalStructureInfo[$this->document->getDoc()->physicalStructure[$i]]['orderlabel']) : ''); |
|
| 77 | + $pageOptions[$i] = '['.$i.']'.($this->document->getDoc()->physicalStructureInfo[$this->document->getDoc()->physicalStructure[$i]]['orderlabel'] ? ' - '.htmlspecialchars($this->document->getDoc()->physicalStructureInfo[$this->document->getDoc()->physicalStructure[$i]]['orderlabel']) : ''); |
|
| 78 | 78 | } |
| 79 | 79 | $this->view->assign('pageOptions', $pageOptions); |
| 80 | 80 | |
@@ -140,7 +140,7 @@ |
||
| 140 | 140 | } |
| 141 | 141 | } |
| 142 | 142 | // Append "IFSUB" to "ITEM_STATE" if this entry has sub-entries. |
| 143 | - $entryArray['ITEM_STATE'] = ($entryArray['ITEM_STATE'] == 'NO' ? 'IFSUB' : $entryArray['ITEM_STATE'] . 'IFSUB'); |
|
| 143 | + $entryArray['ITEM_STATE'] = ($entryArray['ITEM_STATE'] == 'NO' ? 'IFSUB' : $entryArray['ITEM_STATE'].'IFSUB'); |
|
| 144 | 144 | } |
| 145 | 145 | return $entryArray; |
| 146 | 146 | } |
@@ -55,7 +55,7 @@ |
||
| 55 | 55 | $uptimeInSeconds = floor($response->getUptime() / 1000); |
| 56 | 56 | $dateTimeFrom = new \DateTime('@0'); |
| 57 | 57 | $dateTimeTo = new \DateTime("@$uptimeInSeconds"); |
| 58 | - $uptime = $dateTimeFrom->diff($dateTimeTo)->format('%a ' . Helper::getLanguageService()->getLL('flash.days') . ', %H:%I:%S'); |
|
| 58 | + $uptime = $dateTimeFrom->diff($dateTimeTo)->format('%a '.Helper::getLanguageService()->getLL('flash.days').', %H:%I:%S'); |
|
| 59 | 59 | $numDocuments = $response->getNumberOfDocuments(); |
| 60 | 60 | $startTime = $response->getStartTime() ? strftime('%c', $response->getStartTime()->getTimestamp()) : 'N/A'; |
| 61 | 61 | $lastModified = $response->getLastModified() ? strftime('%c', $response->getLastModified()->getTimestamp()) : 'N/A'; |