@@ -243,10 +243,10 @@ discard block |
||
| 243 | 243 | if ($root->item(0) instanceof \DOMNode) { |
| 244 | 244 | $mets = $xml->saveXML($root->item(0)); |
| 245 | 245 | } else { |
| 246 | - $this->logger->error('No METS part found in document with location "' . $record['location'] . '"'); |
|
| 246 | + $this->logger->error('No METS part found in document with location "'.$record['location'].'"'); |
|
| 247 | 247 | } |
| 248 | 248 | } else { |
| 249 | - $this->logger->error('Could not load XML file from "' . $record['location'] . '"'); |
|
| 249 | + $this->logger->error('Could not load XML file from "'.$record['location'].'"'); |
|
| 250 | 250 | } |
| 251 | 251 | return $mets; |
| 252 | 252 | } |
@@ -412,7 +412,7 @@ discard block |
||
| 412 | 412 | $pageSettings = $this->configurationManager->getConfiguration($this->configurationManager::CONFIGURATION_TYPE_FULL_TYPOSCRIPT); |
| 413 | 413 | $storagePid = $pageSettings["plugin."]["tx_dlf."]["persistence."]["storagePid"]; |
| 414 | 414 | if ($storagePid > 0) { |
| 415 | - $this->logger->notice('No records found with PID ' . $storagePid); |
|
| 415 | + $this->logger->notice('No records found with PID '.$storagePid); |
|
| 416 | 416 | } else { |
| 417 | 417 | $this->logger->notice('No records found'); |
| 418 | 418 | } |
@@ -495,7 +495,7 @@ discard block |
||
| 495 | 495 | if (!empty($resArray)) { |
| 496 | 496 | // check, if all required fields are available for a given identifier |
| 497 | 497 | foreach ($details['requiredFields'] as $required) { |
| 498 | - $methodName = 'get' . GeneralUtility::underscoredToUpperCamelCase($required); |
|
| 498 | + $methodName = 'get'.GeneralUtility::underscoredToUpperCamelCase($required); |
|
| 499 | 499 | if (empty($resArray->$methodName())) { |
| 500 | 500 | // Skip metadata formats whose requirements are not met. |
| 501 | 501 | continue 2; |
@@ -600,9 +600,9 @@ discard block |
||
| 600 | 600 | |
| 601 | 601 | if ($resArray = $result->fetch()) { |
| 602 | 602 | if ($resArray['index_query'] != "") { |
| 603 | - $solr_query .= '(' . $resArray['index_query'] . ')'; |
|
| 603 | + $solr_query .= '('.$resArray['index_query'].')'; |
|
| 604 | 604 | } else { |
| 605 | - $solr_query .= 'collection:' . '"' . $resArray['index_name'] . '"'; |
|
| 605 | + $solr_query .= 'collection:'.'"'.$resArray['index_name'].'"'; |
|
| 606 | 606 | } |
| 607 | 607 | } else { |
| 608 | 608 | $this->error = 'noSetHierarchy'; |
@@ -614,7 +614,7 @@ discard block |
||
| 614 | 614 | } |
| 615 | 615 | // Check for required fields. |
| 616 | 616 | foreach ($this->formats[$this->parameters['metadataPrefix']]['requiredFields'] as $required) { |
| 617 | - $solr_query .= ' NOT ' . $required . ':""'; |
|
| 617 | + $solr_query .= ' NOT '.$required.':""'; |
|
| 618 | 618 | } |
| 619 | 619 | // toplevel="true" is always required |
| 620 | 620 | $solr_query .= ' AND toplevel:true'; |
@@ -628,7 +628,7 @@ discard block |
||
| 628 | 628 | ) { |
| 629 | 629 | $timestamp = gmmktime($date_array['tm_hour'], $date_array['tm_min'], $date_array['tm_sec'], |
| 630 | 630 | $date_array['tm_mon'] + 1, $date_array['tm_mday'], $date_array['tm_year'] + 1900); |
| 631 | - $from = date("Y-m-d", $timestamp) . 'T' . date("H:i:s", $timestamp) . '.000Z'; |
|
| 631 | + $from = date("Y-m-d", $timestamp).'T'.date("H:i:s", $timestamp).'.000Z'; |
|
| 632 | 632 | } else { |
| 633 | 633 | $this->error = 'badArgument'; |
| 634 | 634 | return; |
@@ -644,7 +644,7 @@ discard block |
||
| 644 | 644 | ) { |
| 645 | 645 | $timestamp = gmmktime($date_array['tm_hour'], $date_array['tm_min'], $date_array['tm_sec'], |
| 646 | 646 | $date_array['tm_mon'] + 1, $date_array['tm_mday'], $date_array['tm_year'] + 1900); |
| 647 | - $until = date("Y-m-d", $timestamp) . 'T' . date("H:i:s", $timestamp) . '.999Z'; |
|
| 647 | + $until = date("Y-m-d", $timestamp).'T'.date("H:i:s", $timestamp).'.999Z'; |
|
| 648 | 648 | if ($from != "*" && $from > $until) { |
| 649 | 649 | $this->error = 'badArgument'; |
| 650 | 650 | } |
@@ -661,7 +661,7 @@ discard block |
||
| 661 | 661 | $this->error = 'badArgument'; |
| 662 | 662 | } |
| 663 | 663 | } |
| 664 | - $solr_query .= ' AND timestamp:[' . $from . ' TO ' . $until . ']'; |
|
| 664 | + $solr_query .= ' AND timestamp:['.$from.' TO '.$until.']'; |
|
| 665 | 665 | $documentSet = []; |
| 666 | 666 | $solr = Solr::getInstance($this->settings['solrcore']); |
| 667 | 667 | if (!$solr->ready) { |
@@ -780,7 +780,7 @@ discard block |
||
| 780 | 780 | $resumptionTokenInfo['cursor'] = $currentCursor; |
| 781 | 781 | $resumptionTokenInfo['completeListSize'] = $documentListSet['metadata']['completeListSize']; |
| 782 | 782 | $expireDateTime = new \DateTime(); |
| 783 | - $expireDateTime->add(new \DateInterval('PT' . $this->settings['expired'] . 'S')); |
|
| 783 | + $expireDateTime->add(new \DateInterval('PT'.$this->settings['expired'].'S')); |
|
| 784 | 784 | $resumptionTokenInfo['expired'] = $expireDateTime; |
| 785 | 785 | |
| 786 | 786 | $omitResumptionToken = $currentCursor === 0 && $numShownDocuments >= $documentListSet['metadata']['completeListSize']; |
@@ -125,7 +125,7 @@ discard block |
||
| 125 | 125 | if ($this->document) { |
| 126 | 126 | $doc = Doc::getInstance($this->document->getLocation(), $this->settings, true); |
| 127 | 127 | } else { |
| 128 | - $this->logger->error('Invalid UID "' . $requestData['id'] . '" or PID "' . $this->settings['storagePid'] . '" for document loading'); |
|
| 128 | + $this->logger->error('Invalid UID "'.$requestData['id'].'" or PID "'.$this->settings['storagePid'].'" for document loading'); |
|
| 129 | 129 | } |
| 130 | 130 | } else if (GeneralUtility::isValidUrl($requestData['id'])) { |
| 131 | 131 | |
@@ -143,7 +143,7 @@ discard block |
||
| 143 | 143 | |
| 144 | 144 | $this->document->setLocation($requestData['id']); |
| 145 | 145 | } else { |
| 146 | - $this->logger->error('Invalid location given "' . $requestData['id'] . '" for document loading'); |
|
| 146 | + $this->logger->error('Invalid location given "'.$requestData['id'].'" for document loading'); |
|
| 147 | 147 | } |
| 148 | 148 | } |
| 149 | 149 | |
@@ -160,11 +160,11 @@ discard block |
||
| 160 | 160 | if ($this->document !== null && $doc !== null) { |
| 161 | 161 | $this->document->setDoc($doc); |
| 162 | 162 | } else { |
| 163 | - $this->logger->error('Failed to load document with record ID "' . $requestData['recordId'] . '"'); |
|
| 163 | + $this->logger->error('Failed to load document with record ID "'.$requestData['recordId'].'"'); |
|
| 164 | 164 | } |
| 165 | 165 | } |
| 166 | 166 | } else { |
| 167 | - $this->logger->error('Invalid ID "' . $requestData['id'] . '" or PID "' . $this->settings['storagePid'] . '" for document loading'); |
|
| 167 | + $this->logger->error('Invalid ID "'.$requestData['id'].'" or PID "'.$this->settings['storagePid'].'" for document loading'); |
|
| 168 | 168 | } |
| 169 | 169 | } |
| 170 | 170 | |
@@ -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'] = []; |
@@ -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'; |
@@ -139,10 +139,10 @@ discard block |
||
| 139 | 139 | ) { |
| 140 | 140 | // Get current configuration. |
| 141 | 141 | $result = $queryBuilder |
| 142 | - ->select($table . '.is_listed AS is_listed') |
|
| 142 | + ->select($table.'.is_listed AS is_listed') |
|
| 143 | 143 | ->from($table) |
| 144 | 144 | ->where( |
| 145 | - $queryBuilder->expr()->eq($table . '.uid', intval($id)), |
|
| 145 | + $queryBuilder->expr()->eq($table.'.uid', intval($id)), |
|
| 146 | 146 | Helper::whereExpression($table) |
| 147 | 147 | ) |
| 148 | 148 | ->setMaxResults(1) |
@@ -164,10 +164,10 @@ discard block |
||
| 164 | 164 | ) { |
| 165 | 165 | // Get current configuration. |
| 166 | 166 | $result = $queryBuilder |
| 167 | - ->select($table . '.index_autocomplete AS index_autocomplete') |
|
| 167 | + ->select($table.'.index_autocomplete AS index_autocomplete') |
|
| 168 | 168 | ->from($table) |
| 169 | 169 | ->where( |
| 170 | - $queryBuilder->expr()->eq($table . '.uid', intval($id)), |
|
| 170 | + $queryBuilder->expr()->eq($table.'.uid', intval($id)), |
|
| 171 | 171 | Helper::whereExpression($table) |
| 172 | 172 | ) |
| 173 | 173 | ->setMaxResults(1) |
@@ -242,7 +242,7 @@ discard block |
||
| 242 | 242 | if ($solr->ready) { |
| 243 | 243 | // Delete Solr document. |
| 244 | 244 | $updateQuery = $solr->service->createUpdate(); |
| 245 | - $updateQuery->addDeleteQuery('uid:' . $id); |
|
| 245 | + $updateQuery->addDeleteQuery('uid:'.$id); |
|
| 246 | 246 | $updateQuery->addCommit(); |
| 247 | 247 | $solr->service->update($updateQuery); |
| 248 | 248 | } |
@@ -254,7 +254,7 @@ discard block |
||
| 254 | 254 | $document->setDoc($doc); |
| 255 | 255 | Indexer::add($document); |
| 256 | 256 | } else { |
| 257 | - $this->logger->error('Failed to re-index document with UID ' . $id); |
|
| 257 | + $this->logger->error('Failed to re-index document with UID '.$id); |
|
| 258 | 258 | } |
| 259 | 259 | } |
| 260 | 260 | } |
@@ -321,7 +321,7 @@ discard block |
||
| 321 | 321 | if ($solr->ready) { |
| 322 | 322 | // Delete Solr document. |
| 323 | 323 | $updateQuery = $solr->service->createUpdate(); |
| 324 | - $updateQuery->addDeleteQuery('uid:' . $id); |
|
| 324 | + $updateQuery->addDeleteQuery('uid:'.$id); |
|
| 325 | 325 | $updateQuery->addCommit(); |
| 326 | 326 | $solr->service->update($updateQuery); |
| 327 | 327 | if ($command == 'delete') { |
@@ -336,7 +336,7 @@ discard block |
||
| 336 | 336 | $document->setDoc($doc); |
| 337 | 337 | Indexer::add($document); |
| 338 | 338 | } else { |
| 339 | - $this->logger->error('Failed to re-index document with UID ' . $id); |
|
| 339 | + $this->logger->error('Failed to re-index document with UID '.$id); |
|
| 340 | 340 | } |
| 341 | 341 | break; |
| 342 | 342 | } |
@@ -387,7 +387,7 @@ discard block |
||
| 387 | 387 | // Nothing to do here. |
| 388 | 388 | } |
| 389 | 389 | } |
| 390 | - $this->logger->warning('Core ' . $resArray['core'] . ' could not be deleted from Apache Solr'); |
|
| 390 | + $this->logger->warning('Core '.$resArray['core'].' could not be deleted from Apache Solr'); |
|
| 391 | 391 | } |
| 392 | 392 | } |
| 393 | 393 | } |
@@ -126,8 +126,8 @@ |
||
| 126 | 126 | ->select(...explode(',', $fields)) |
| 127 | 127 | ->from($table) |
| 128 | 128 | ->where( |
| 129 | - $queryBuilder->expr()->eq($table . '.pid', intval($this->storagePid)), |
|
| 130 | - $queryBuilder->expr()->in($table . '.sys_language_uid', [-1, 0]), |
|
| 129 | + $queryBuilder->expr()->eq($table.'.pid', intval($this->storagePid)), |
|
| 130 | + $queryBuilder->expr()->in($table.'.sys_language_uid', [-1, 0]), |
|
| 131 | 131 | $andWhere |
| 132 | 132 | ) |
| 133 | 133 | ->orderBy($sorting) |