@@ -134,7 +134,7 @@ discard block |
||
| 134 | 134 | foreach ($this->requestData['selected'] as $docValue) { |
| 135 | 135 | if ($docValue['id']) { |
| 136 | 136 | $docData = $this->getDocumentData((int) $docValue['id'], $docValue); |
| 137 | - $pdfUrl .= $docData['urlParams'] . $this->settings['pdfparamseparator']; |
|
| 137 | + $pdfUrl .= $docData['urlParams'].$this->settings['pdfparamseparator']; |
|
| 138 | 138 | $this->redirectToUri($pdfUrl); |
| 139 | 139 | } |
| 140 | 140 | } |
@@ -201,7 +201,7 @@ discard block |
||
| 201 | 201 | if ($allMails->count() > 0) { |
| 202 | 202 | $mailSelect[0] = htmlspecialchars(LocalizationUtility::translate('basket.chooseMail', 'dlf')); |
| 203 | 203 | foreach ($allMails as $mail) { |
| 204 | - $mailSelect[$mail->getUid()] = htmlspecialchars($mail->getName()) . ' (' . htmlspecialchars($mail->getMail()) . ')'; |
|
| 204 | + $mailSelect[$mail->getUid()] = htmlspecialchars($mail->getName()).' ('.htmlspecialchars($mail->getMail()).')'; |
|
| 205 | 205 | } |
| 206 | 206 | $this->view->assign('mailSelect', $mailSelect); |
| 207 | 207 | } |
@@ -290,12 +290,12 @@ discard block |
||
| 290 | 290 | |
| 291 | 291 | $docData = $this->getDocumentData((int) $id, $data); |
| 292 | 292 | |
| 293 | - $entryKey = $id . '_' . $startPage; |
|
| 293 | + $entryKey = $id.'_'.$startPage; |
|
| 294 | 294 | if (!empty($startX)) { |
| 295 | - $entryKey .= '_' . $startX; |
|
| 295 | + $entryKey .= '_'.$startX; |
|
| 296 | 296 | } |
| 297 | 297 | if (!empty($endX)) { |
| 298 | - $entryKey .= '_' . $endX; |
|
| 298 | + $entryKey .= '_'.$endX; |
|
| 299 | 299 | } |
| 300 | 300 | |
| 301 | 301 | $entry = [ |
@@ -354,7 +354,7 @@ discard block |
||
| 354 | 354 | $urlParams = str_replace("##endy##", $data['endY'] === "" ? "" : (int) $data['endY'], $urlParams); |
| 355 | 355 | $urlParams = str_replace("##rotation##", $data['rotation'] === "" ? "" : (int) $data['rotation'], $urlParams); |
| 356 | 356 | |
| 357 | - $downloadUrl = $this->settings['pdfgenerate'] . $urlParams; |
|
| 357 | + $downloadUrl = $this->settings['pdfgenerate'].$urlParams; |
|
| 358 | 358 | |
| 359 | 359 | $title = $this->document->getTitle(); |
| 360 | 360 | if (empty($title)) { |
@@ -365,15 +365,15 @@ discard block |
||
| 365 | 365 | $info = ''; |
| 366 | 366 | if ($data['startX'] != '' && $data['endX'] != '') { |
| 367 | 367 | // cutout |
| 368 | - $info .= htmlspecialchars(LocalizationUtility::translate('basket.cutout', 'dlf')) . ' '; |
|
| 368 | + $info .= htmlspecialchars(LocalizationUtility::translate('basket.cutout', 'dlf')).' '; |
|
| 369 | 369 | } |
| 370 | 370 | if ($data['startpage'] == $data['endpage']) { |
| 371 | 371 | // One page |
| 372 | - $info .= htmlspecialchars(LocalizationUtility::translate('page', 'dlf')) . ' ' . $data['startpage']; |
|
| 372 | + $info .= htmlspecialchars(LocalizationUtility::translate('page', 'dlf')).' '.$data['startpage']; |
|
| 373 | 373 | } else { |
| 374 | - $info .= htmlspecialchars(LocalizationUtility::translate('page', 'dlf')) . ' ' . $data['startpage'] . '-' . $data['endpage']; |
|
| 374 | + $info .= htmlspecialchars(LocalizationUtility::translate('page', 'dlf')).' '.$data['startpage'].'-'.$data['endpage']; |
|
| 375 | 375 | } |
| 376 | - $downloadLink = '<a href="' . $downloadUrl . '" target="_blank">' . htmlspecialchars($title) . '</a> (' . $info . ')'; |
|
| 376 | + $downloadLink = '<a href="'.$downloadUrl.'" target="_blank">'.htmlspecialchars($title).'</a> ('.$info.')'; |
|
| 377 | 377 | if ($data['startpage'] == $data['endpage']) { |
| 378 | 378 | $pageNums = 1; |
| 379 | 379 | } else { |
@@ -446,12 +446,12 @@ discard block |
||
| 446 | 446 | if ($piVars['addToBasket'] == 'list') { |
| 447 | 447 | $documentItem['endpage'] = $this->document->getCurrentDocument()->numPages; |
| 448 | 448 | } |
| 449 | - $arrayKey = $documentItem['id'] . '_' . $page; |
|
| 449 | + $arrayKey = $documentItem['id'].'_'.$page; |
|
| 450 | 450 | if (!empty($documentItem['startX'])) { |
| 451 | - $arrayKey .= '_' . $documentItem['startX']; |
|
| 451 | + $arrayKey .= '_'.$documentItem['startX']; |
|
| 452 | 452 | } |
| 453 | 453 | if (!empty($documentItem['endX'])) { |
| 454 | - $arrayKey .= '_' . $documentItem['endX']; |
|
| 454 | + $arrayKey .= '_'.$documentItem['endX']; |
|
| 455 | 455 | } |
| 456 | 456 | // do not add more than one identical object |
| 457 | 457 | if (!in_array($arrayKey, $items)) { |
@@ -472,14 +472,14 @@ discard block |
||
| 472 | 472 | // remove parameter endpage |
| 473 | 473 | $pdfParams = str_replace(",##endpage##", '', $pdfParams); |
| 474 | 474 | } |
| 475 | - $pdfGenerateUrl = $this->settings['pdfgenerate'] . $pdfParams; |
|
| 475 | + $pdfGenerateUrl = $this->settings['pdfgenerate'].$pdfParams; |
|
| 476 | 476 | if ($this->settings['pregeneration']) { |
| 477 | 477 | // send ajax request to webapp |
| 478 | 478 | $output .= ' |
| 479 | 479 | <script> |
| 480 | 480 | $(document).ready(function(){ |
| 481 | 481 | $.ajax({ |
| 482 | - url: "' . $pdfGenerateUrl . '", |
|
| 482 | + url: "' . $pdfGenerateUrl.'", |
|
| 483 | 483 | }).done(function() { |
| 484 | 484 | }); |
| 485 | 485 | }); |
@@ -517,12 +517,12 @@ discard block |
||
| 517 | 517 | } |
| 518 | 518 | foreach ($piVars['selected'] as $value) { |
| 519 | 519 | if (isset($value['id'])) { |
| 520 | - $arrayKey = $value['id'] . '_' . $value['startpage']; |
|
| 520 | + $arrayKey = $value['id'].'_'.$value['startpage']; |
|
| 521 | 521 | if (!empty($value['startX'])) { |
| 522 | - $arrayKey .= '_' . $value['startX']; |
|
| 522 | + $arrayKey .= '_'.$value['startX']; |
|
| 523 | 523 | } |
| 524 | 524 | if (!empty($value['endX'])) { |
| 525 | - $arrayKey .= '_' . $value['endX']; |
|
| 525 | + $arrayKey .= '_'.$value['endX']; |
|
| 526 | 526 | } |
| 527 | 527 | if (isset($items[$arrayKey])) { |
| 528 | 528 | unset($items[$arrayKey]); |
@@ -555,7 +555,7 @@ discard block |
||
| 555 | 555 | |
| 556 | 556 | $mailObject = $this->mailRepository->findByUid(intval($mailId))->getFirst(); |
| 557 | 557 | |
| 558 | - $mailText = htmlspecialchars(LocalizationUtility::translate('basket.mailBody', 'dlf')) . "\n"; |
|
| 558 | + $mailText = htmlspecialchars(LocalizationUtility::translate('basket.mailBody', 'dlf'))."\n"; |
|
| 559 | 559 | $numberOfPages = 0; |
| 560 | 560 | $pdfUrl = $this->settings['pdfdownload']; |
| 561 | 561 | // prepare links |
@@ -563,7 +563,7 @@ discard block |
||
| 563 | 563 | if ($docValue['id']) { |
| 564 | 564 | $explodeId = explode("_", $docValue['id']); |
| 565 | 565 | $docData = $this->getDocumentData((int) $explodeId[0], $docValue); |
| 566 | - $pdfUrl .= $docData['urlParams'] . $this->settings['pdfparamseparator']; |
|
| 566 | + $pdfUrl .= $docData['urlParams'].$this->settings['pdfparamseparator']; |
|
| 567 | 567 | $pages = (abs(intval($docValue['startpage']) - intval($docValue['endpage']))); |
| 568 | 568 | if ($pages === 0) { |
| 569 | 569 | $numberOfPages = $numberOfPages + 1; |
@@ -574,7 +574,7 @@ discard block |
||
| 574 | 574 | } |
| 575 | 575 | // Remove leading/tailing pdfparamseperator |
| 576 | 576 | $pdfUrl = trim($pdfUrl, $this->settings['pdfparamseparator']); |
| 577 | - $mailBody = $mailText . $pdfUrl; |
|
| 577 | + $mailBody = $mailText.$pdfUrl; |
|
| 578 | 578 | // Get hook objects. |
| 579 | 579 | $hookObjects = Helper::getHookObjects('Classes/Controller/BasketController.php'); |
| 580 | 580 | // Hook for getting a customized mail body. |
@@ -601,7 +601,7 @@ discard block |
||
| 601 | 601 | $newActionLog = GeneralUtility::makeInstance(ActionLog::class); |
| 602 | 602 | $newActionLog->setFileName($pdfUrl); |
| 603 | 603 | $newActionLog->setCountPages($numberOfPages); |
| 604 | - $newActionLog->setLabel('Mail: ' . $mailObject->getMail()); |
|
| 604 | + $newActionLog->setLabel('Mail: '.$mailObject->getMail()); |
|
| 605 | 605 | |
| 606 | 606 | if ($this->isUserLoggedIn()) { |
| 607 | 607 | // internal user |
@@ -630,7 +630,7 @@ discard block |
||
| 630 | 630 | foreach ($this->requestData['selected'] as $docId => $docValue) { |
| 631 | 631 | if ($docValue['id']) { |
| 632 | 632 | $docData = $this->getDocumentData((int) $docValue['id'], $docValue); |
| 633 | - $pdfUrl .= $docData['urlParams'] . $this->settings['pdfparamseparator']; |
|
| 633 | + $pdfUrl .= $docData['urlParams'].$this->settings['pdfparamseparator']; |
|
| 634 | 634 | $numberOfPages += $docData['pageNums']; |
| 635 | 635 | } |
| 636 | 636 | } |
@@ -648,7 +648,7 @@ discard block |
||
| 648 | 648 | if ($docValue['id']) { |
| 649 | 649 | $explodeId = explode("_", $docId); |
| 650 | 650 | $docData = $this->getDocumentData((int) $explodeId[0], $docValue); |
| 651 | - $pdfUrl .= $docData['urlParams'] . $this->settings['pdfparamseparator']; |
|
| 651 | + $pdfUrl .= $docData['urlParams'].$this->settings['pdfparamseparator']; |
|
| 652 | 652 | $numberOfPages += $docData['pageNums']; |
| 653 | 653 | } |
| 654 | 654 | } |
@@ -665,12 +665,12 @@ discard block |
||
| 665 | 665 | // internal user |
| 666 | 666 | $actionLog->setUserId($GLOBALS["TSFE"]->fe_user->user['uid']); |
| 667 | 667 | $actionLog->setName($GLOBALS["TSFE"]->fe_user->user['username']); |
| 668 | - $actionLog->setLabel('Print: ' . $printer->getLabel()); |
|
| 668 | + $actionLog->setLabel('Print: '.$printer->getLabel()); |
|
| 669 | 669 | } else { |
| 670 | 670 | // external user |
| 671 | 671 | $actionLog->setUserId(0); |
| 672 | 672 | $actionLog->setName('n/a'); |
| 673 | - $actionLog->setLabel('Print: ' . $printer->getLabel()); |
|
| 673 | + $actionLog->setLabel('Print: '.$printer->getLabel()); |
|
| 674 | 674 | } |
| 675 | 675 | // add action to protocol |
| 676 | 676 | $this->actionLogRepository->add($actionLog); |
@@ -271,7 +271,7 @@ discard block |
||
| 271 | 271 | |
| 272 | 272 | $data['tx_dlf_metadata'][uniqid('NEW')] = [ |
| 273 | 273 | 'pid' => $this->pid, |
| 274 | - 'label' => $this->getLLL('metadata.' . $indexName, $this->siteLanguages[0]->getTypo3Language(), $metadataLabels), |
|
| 274 | + 'label' => $this->getLLL('metadata.'.$indexName, $this->siteLanguages[0]->getTypo3Language(), $metadataLabels), |
|
| 275 | 275 | 'index_name' => $indexName, |
| 276 | 276 | 'format' => implode(',', $formatIds), |
| 277 | 277 | 'default_value' => $values['default_value'], |
@@ -310,7 +310,7 @@ discard block |
||
| 310 | 310 | 'pid' => $this->pid, |
| 311 | 311 | 'sys_language_uid' => $siteLanguage->getLanguageId(), |
| 312 | 312 | 'l18n_parent' => $id, |
| 313 | - 'label' => $this->getLLL('metadata.' . $indexName, $siteLanguage->getTypo3Language(), $metadataLabels), |
|
| 313 | + 'label' => $this->getLLL('metadata.'.$indexName, $siteLanguage->getTypo3Language(), $metadataLabels), |
|
| 314 | 314 | ]; |
| 315 | 315 | } |
| 316 | 316 | |
@@ -336,7 +336,7 @@ discard block |
||
| 336 | 336 | |
| 337 | 337 | if ($this->solrCoreRepository->findOneByPid($this->pid) === null) { |
| 338 | 338 | $newRecord = GeneralUtility::makeInstance(SolrCore::class); |
| 339 | - $newRecord->setLabel($this->getLLL('flexform.solrcore', $this->siteLanguages[0]->getTypo3Language(), $beLabels). ' (PID ' . $this->pid . ')'); |
|
| 339 | + $newRecord->setLabel($this->getLLL('flexform.solrcore', $this->siteLanguages[0]->getTypo3Language(), $beLabels).' (PID '.$this->pid.')'); |
|
| 340 | 340 | $indexName = Solr::createCore(''); |
| 341 | 341 | if (!empty($indexName)) { |
| 342 | 342 | $newRecord->setIndexName($indexName); |
@@ -376,7 +376,7 @@ discard block |
||
| 376 | 376 | $data['tx_dlf_structures'][uniqid('NEW')] = [ |
| 377 | 377 | 'pid' => $this->pid, |
| 378 | 378 | 'toplevel' => $values['toplevel'], |
| 379 | - 'label' => $this->getLLL('structure.' . $indexName, $this->siteLanguages[0]->getTypo3Language(), $structureLabels), |
|
| 379 | + 'label' => $this->getLLL('structure.'.$indexName, $this->siteLanguages[0]->getTypo3Language(), $structureLabels), |
|
| 380 | 380 | 'index_name' => $indexName, |
| 381 | 381 | 'oai_name' => $values['oai_name'], |
| 382 | 382 | 'thumbnail' => 0, |
@@ -401,7 +401,7 @@ discard block |
||
| 401 | 401 | 'pid' => $this->pid, |
| 402 | 402 | 'sys_language_uid' => $siteLanguage->getLanguageId(), |
| 403 | 403 | 'l18n_parent' => $id, |
| 404 | - 'label' => $this->getLLL('structure.' . $indexName, $siteLanguage->getTypo3Language(), $structureLabels), |
|
| 404 | + 'label' => $this->getLLL('structure.'.$indexName, $siteLanguage->getTypo3Language(), $structureLabels), |
|
| 405 | 405 | ]; |
| 406 | 406 | } |
| 407 | 407 | |
@@ -478,7 +478,7 @@ discard block |
||
| 478 | 478 | } elseif (isset($langArray['default'][$index][0]['target'])) { |
| 479 | 479 | return $langArray['default'][$index][0]['target']; |
| 480 | 480 | } else { |
| 481 | - return 'Missing translation for ' . $index; |
|
| 481 | + return 'Missing translation for '.$index; |
|
| 482 | 482 | } |
| 483 | 483 | } |
| 484 | 484 | |
@@ -493,7 +493,7 @@ discard block |
||
| 493 | 493 | */ |
| 494 | 494 | private function getRecords(string $recordType): array |
| 495 | 495 | { |
| 496 | - $filePath = GeneralUtility::getFileAbsFileName('EXT:dlf/Resources/Private/Data/' . $recordType . 'Defaults.json'); |
|
| 496 | + $filePath = GeneralUtility::getFileAbsFileName('EXT:dlf/Resources/Private/Data/'.$recordType.'Defaults.json'); |
|
| 497 | 497 | if (file_exists($filePath)) { |
| 498 | 498 | $fileContents = file_get_contents($filePath); |
| 499 | 499 | $records = json_decode($fileContents, true); |
@@ -99,7 +99,7 @@ discard block |
||
| 99 | 99 | */ |
| 100 | 100 | protected function getClass(FlashMessage $flashMessage): string |
| 101 | 101 | { |
| 102 | - return 'alert-' . self::$classes[$this->getSeverityAsInt($flashMessage)]; |
|
| 102 | + return 'alert-'.self::$classes[$this->getSeverityAsInt($flashMessage)]; |
|
| 103 | 103 | } |
| 104 | 104 | |
| 105 | 105 | /** |
@@ -134,19 +134,19 @@ discard block |
||
| 134 | 134 | $markup[] = '<div class="typo3-messages">'; |
| 135 | 135 | foreach ($flashMessages as $flashMessage) { |
| 136 | 136 | $messageTitle = $flashMessage->getTitle(); |
| 137 | - $markup[] = '<div class="alert ' . htmlspecialchars($this->getClass($flashMessage)) . '">'; |
|
| 137 | + $markup[] = '<div class="alert '.htmlspecialchars($this->getClass($flashMessage)).'">'; |
|
| 138 | 138 | $markup[] = ' <div class="media">'; |
| 139 | 139 | $markup[] = ' <div class="media-left">'; |
| 140 | 140 | $markup[] = ' <span class="fa-stack fa-lg">'; |
| 141 | 141 | $markup[] = ' <i class="fa fa-circle fa-stack-2x"></i>'; |
| 142 | - $markup[] = ' <i class="fa fa-' . htmlspecialchars($this->getIconName($flashMessage)) . ' fa-stack-1x"></i>'; |
|
| 142 | + $markup[] = ' <i class="fa fa-'.htmlspecialchars($this->getIconName($flashMessage)).' fa-stack-1x"></i>'; |
|
| 143 | 143 | $markup[] = ' </span>'; |
| 144 | 144 | $markup[] = ' </div>'; |
| 145 | 145 | $markup[] = ' <div class="media-body">'; |
| 146 | 146 | if ($messageTitle !== '') { |
| 147 | - $markup[] = ' <h4 class="alert-title">' . htmlspecialchars($messageTitle) . '</h4>'; |
|
| 147 | + $markup[] = ' <h4 class="alert-title">'.htmlspecialchars($messageTitle).'</h4>'; |
|
| 148 | 148 | } |
| 149 | - $markup[] = ' <p class="alert-message">' . $flashMessage->getMessage() . '</p>'; |
|
| 149 | + $markup[] = ' <p class="alert-message">'.$flashMessage->getMessage().'</p>'; |
|
| 150 | 150 | $markup[] = ' </div>'; |
| 151 | 151 | $markup[] = ' </div>'; |
| 152 | 152 | $markup[] = '</div>'; |
@@ -150,7 +150,7 @@ discard block |
||
| 150 | 150 | } elseif ($checksum == 10) { |
| 151 | 151 | //TODO: Binary operation "+" between string and 1 results in an error. |
| 152 | 152 | // @phpstan-ignore-next-line |
| 153 | - return self::checkIdentifier(($digits + 1) . substr($id, -2, 2), 'SWD'); |
|
| 153 | + return self::checkIdentifier(($digits + 1).substr($id, -2, 2), 'SWD'); |
|
| 154 | 154 | } elseif (substr($id, -1, 1) != $checksum) { |
| 155 | 155 | return false; |
| 156 | 156 | } |
@@ -356,7 +356,7 @@ discard block |
||
| 356 | 356 | $encrypted = openssl_encrypt($string, self::$cipherAlgorithm, $key, OPENSSL_RAW_DATA, $iv); |
| 357 | 357 | // Merge initialization vector and encrypted data. |
| 358 | 358 | if ($encrypted !== false) { |
| 359 | - $encrypted = base64_encode($iv . $encrypted); |
|
| 359 | + $encrypted = base64_encode($iv.$encrypted); |
|
| 360 | 360 | } |
| 361 | 361 | return $encrypted; |
| 362 | 362 | } |
@@ -398,8 +398,8 @@ discard block |
||
| 398 | 398 | public static function getHookObjects(string $scriptRelPath): array |
| 399 | 399 | { |
| 400 | 400 | $hookObjects = []; |
| 401 | - if (is_array(self::getOptions()[self::$extKey . '/' . $scriptRelPath]['hookClass'])) { |
|
| 402 | - foreach (self::getOptions()[self::$extKey . '/' . $scriptRelPath]['hookClass'] as $classRef) { |
|
| 401 | + if (is_array(self::getOptions()[self::$extKey.'/'.$scriptRelPath]['hookClass'])) { |
|
| 402 | + foreach (self::getOptions()[self::$extKey.'/'.$scriptRelPath]['hookClass'] as $classRef) { |
|
| 403 | 403 | $hookObjects[] = GeneralUtility::makeInstance($classRef); |
| 404 | 404 | } |
| 405 | 405 | } |
@@ -428,12 +428,12 @@ discard block |
||
| 428 | 428 | // NOTE: Only use tables that don't have too many entries! |
| 429 | 429 | || !in_array($table, ['tx_dlf_collections', 'tx_dlf_libraries', 'tx_dlf_metadata', 'tx_dlf_metadatasubentries', 'tx_dlf_structures', 'tx_dlf_solrcores']) |
| 430 | 430 | ) { |
| 431 | - self::log('Invalid UID "' . $uid . '" or table "' . $table . '"', LOG_SEVERITY_ERROR); |
|
| 431 | + self::log('Invalid UID "'.$uid.'" or table "'.$table.'"', LOG_SEVERITY_ERROR); |
|
| 432 | 432 | return ''; |
| 433 | 433 | } |
| 434 | 434 | |
| 435 | - $makeCacheKey = function ($pid, $uid) { |
|
| 436 | - return $pid . '.' . $uid; |
|
| 435 | + $makeCacheKey = function($pid, $uid) { |
|
| 436 | + return $pid.'.'.$uid; |
|
| 437 | 437 | }; |
| 438 | 438 | |
| 439 | 439 | static $cache = []; |
@@ -443,9 +443,9 @@ discard block |
||
| 443 | 443 | |
| 444 | 444 | $result = $queryBuilder |
| 445 | 445 | ->select( |
| 446 | - $table . '.index_name AS index_name', |
|
| 447 | - $table . '.uid AS uid', |
|
| 448 | - $table . '.pid AS pid', |
|
| 446 | + $table.'.index_name AS index_name', |
|
| 447 | + $table.'.uid AS uid', |
|
| 448 | + $table.'.pid AS pid', |
|
| 449 | 449 | ) |
| 450 | 450 | ->from($table) |
| 451 | 451 | ->execute(); |
@@ -463,7 +463,7 @@ discard block |
||
| 463 | 463 | $result = $cache[$table][$cacheKey] ?? ''; |
| 464 | 464 | |
| 465 | 465 | if ($result === '') { |
| 466 | - self::log('No "index_name" with UID ' . $uid . ' and PID ' . $pid . ' found in table "' . $table . '"', LOG_SEVERITY_WARNING); |
|
| 466 | + self::log('No "index_name" with UID '.$uid.' and PID '.$pid.' found in table "'.$table.'"', LOG_SEVERITY_WARNING); |
|
| 467 | 467 | } |
| 468 | 468 | |
| 469 | 469 | return $result; |
@@ -492,11 +492,11 @@ discard block |
||
| 492 | 492 | // No ISO code, return unchanged. |
| 493 | 493 | return $code; |
| 494 | 494 | } |
| 495 | - $lang = LocalizationUtility::translate('LLL:' . $file . ':' . $code); |
|
| 495 | + $lang = LocalizationUtility::translate('LLL:'.$file.':'.$code); |
|
| 496 | 496 | if (!empty($lang)) { |
| 497 | 497 | return $lang; |
| 498 | 498 | } else { |
| 499 | - self::log('Language code "' . $code . '" not found in ISO-639 table', LOG_SEVERITY_NOTICE); |
|
| 499 | + self::log('Language code "'.$code.'" not found in ISO-639 table', LOG_SEVERITY_NOTICE); |
|
| 500 | 500 | return $code; |
| 501 | 501 | } |
| 502 | 502 | } |
@@ -660,7 +660,7 @@ discard block |
||
| 660 | 660 | // Sanitize input. |
| 661 | 661 | $pid = max((int) $pid, 0); |
| 662 | 662 | if (!$pid) { |
| 663 | - self::log('Invalid PID ' . $pid . ' for translation', LOG_SEVERITY_WARNING); |
|
| 663 | + self::log('Invalid PID '.$pid.' for translation', LOG_SEVERITY_WARNING); |
|
| 664 | 664 | return $indexName; |
| 665 | 665 | } |
| 666 | 666 | /** @var PageRepository $pageRepository */ |
@@ -683,13 +683,13 @@ discard block |
||
| 683 | 683 | // First fetch the uid of the received index_name |
| 684 | 684 | $result = $queryBuilder |
| 685 | 685 | ->select( |
| 686 | - $table . '.uid AS uid', |
|
| 687 | - $table . '.l18n_parent AS l18n_parent' |
|
| 686 | + $table.'.uid AS uid', |
|
| 687 | + $table.'.l18n_parent AS l18n_parent' |
|
| 688 | 688 | ) |
| 689 | 689 | ->from($table) |
| 690 | 690 | ->where( |
| 691 | - $queryBuilder->expr()->eq($table . '.pid', $pid), |
|
| 692 | - $queryBuilder->expr()->eq($table . '.index_name', $queryBuilder->expr()->literal($indexName)), |
|
| 691 | + $queryBuilder->expr()->eq($table.'.pid', $pid), |
|
| 692 | + $queryBuilder->expr()->eq($table.'.index_name', $queryBuilder->expr()->literal($indexName)), |
|
| 693 | 693 | self::whereExpression($table, true) |
| 694 | 694 | ) |
| 695 | 695 | ->setMaxResults(1) |
@@ -700,12 +700,12 @@ discard block |
||
| 700 | 700 | if ($row) { |
| 701 | 701 | // Now we use the uid of the l18_parent to fetch the index_name of the translated content element. |
| 702 | 702 | $result = $queryBuilder |
| 703 | - ->select($table . '.index_name AS index_name') |
|
| 703 | + ->select($table.'.index_name AS index_name') |
|
| 704 | 704 | ->from($table) |
| 705 | 705 | ->where( |
| 706 | - $queryBuilder->expr()->eq($table . '.pid', $pid), |
|
| 707 | - $queryBuilder->expr()->eq($table . '.uid', $row['l18n_parent']), |
|
| 708 | - $queryBuilder->expr()->eq($table . '.sys_language_uid', (int) $languageContentId), |
|
| 706 | + $queryBuilder->expr()->eq($table.'.pid', $pid), |
|
| 707 | + $queryBuilder->expr()->eq($table.'.uid', $row['l18n_parent']), |
|
| 708 | + $queryBuilder->expr()->eq($table.'.sys_language_uid', (int) $languageContentId), |
|
| 709 | 709 | self::whereExpression($table, true) |
| 710 | 710 | ) |
| 711 | 711 | ->setMaxResults(1) |
@@ -723,14 +723,14 @@ discard block |
||
| 723 | 723 | if (empty($labels[$table][$pid][$languageContentId][$indexName])) { |
| 724 | 724 | // Check if this table is allowed for translation. |
| 725 | 725 | if (in_array($table, ['tx_dlf_collections', 'tx_dlf_libraries', 'tx_dlf_metadata', 'tx_dlf_metadatasubentries', 'tx_dlf_structures'])) { |
| 726 | - $additionalWhere = $queryBuilder->expr()->in($table . '.sys_language_uid', [-1, 0]); |
|
| 726 | + $additionalWhere = $queryBuilder->expr()->in($table.'.sys_language_uid', [-1, 0]); |
|
| 727 | 727 | if ($languageContentId > 0) { |
| 728 | 728 | $additionalWhere = $queryBuilder->expr()->andX( |
| 729 | 729 | $queryBuilder->expr()->orX( |
| 730 | - $queryBuilder->expr()->in($table . '.sys_language_uid', [-1, 0]), |
|
| 731 | - $queryBuilder->expr()->eq($table . '.sys_language_uid', (int) $languageContentId) |
|
| 730 | + $queryBuilder->expr()->in($table.'.sys_language_uid', [-1, 0]), |
|
| 731 | + $queryBuilder->expr()->eq($table.'.sys_language_uid', (int) $languageContentId) |
|
| 732 | 732 | ), |
| 733 | - $queryBuilder->expr()->eq($table . '.l18n_parent', 0) |
|
| 733 | + $queryBuilder->expr()->eq($table.'.l18n_parent', 0) |
|
| 734 | 734 | ); |
| 735 | 735 | } |
| 736 | 736 | |
@@ -739,7 +739,7 @@ discard block |
||
| 739 | 739 | ->select('*') |
| 740 | 740 | ->from($table) |
| 741 | 741 | ->where( |
| 742 | - $queryBuilder->expr()->eq($table . '.pid', $pid), |
|
| 742 | + $queryBuilder->expr()->eq($table.'.pid', $pid), |
|
| 743 | 743 | $additionalWhere, |
| 744 | 744 | self::whereExpression($table, true) |
| 745 | 745 | ) |
@@ -757,10 +757,10 @@ discard block |
||
| 757 | 757 | } |
| 758 | 758 | } |
| 759 | 759 | } else { |
| 760 | - self::log('No translation with PID ' . $pid . ' available in table "' . $table . '" or translation not accessible', LOG_SEVERITY_NOTICE); |
|
| 760 | + self::log('No translation with PID '.$pid.' available in table "'.$table.'" or translation not accessible', LOG_SEVERITY_NOTICE); |
|
| 761 | 761 | } |
| 762 | 762 | } else { |
| 763 | - self::log('No translations available for table "' . $table . '"', LOG_SEVERITY_WARNING); |
|
| 763 | + self::log('No translations available for table "'.$table.'"', LOG_SEVERITY_WARNING); |
|
| 764 | 764 | } |
| 765 | 765 | } |
| 766 | 766 | |
@@ -804,7 +804,7 @@ discard block |
||
| 804 | 804 | return GeneralUtility::makeInstance(ConnectionPool::class) |
| 805 | 805 | ->getQueryBuilderForTable($table) |
| 806 | 806 | ->expr() |
| 807 | - ->eq($table . '.' . $GLOBALS['TCA'][$table]['ctrl']['delete'], 0); |
|
| 807 | + ->eq($table.'.'.$GLOBALS['TCA'][$table]['ctrl']['delete'], 0); |
|
| 808 | 808 | } else { |
| 809 | 809 | self::log('Unexpected application type (neither frontend or backend)', LOG_SEVERITY_ERROR); |
| 810 | 810 | return '1=-1'; |
@@ -870,7 +870,7 @@ discard block |
||
| 870 | 870 | try { |
| 871 | 871 | $response = $requestFactory->request($url, 'GET', $configuration); |
| 872 | 872 | } catch (\Exception $e) { |
| 873 | - self::log('Could not fetch data from URL "' . $url . '". Error: ' . $e->getMessage() . '.', LOG_SEVERITY_WARNING); |
|
| 873 | + self::log('Could not fetch data from URL "'.$url.'". Error: '.$e->getMessage().'.', LOG_SEVERITY_WARNING); |
|
| 874 | 874 | return false; |
| 875 | 875 | } |
| 876 | 876 | return $response->getBody()->getContents(); |
@@ -26,7 +26,7 @@ |
||
| 26 | 26 | 'navigationComponentId' => '@typo3/backend/page-tree/page-tree-element', |
| 27 | 27 | 'controllerActions' => [ |
| 28 | 28 | \Kitodo\Dlf\Controller\Backend\NewTenantController::class => [ |
| 29 | - 'index','error','addFormat','addMetadata','addSolrCore','addStructure' |
|
| 29 | + 'index', 'error', 'addFormat', 'addMetadata', 'addSolrCore', 'addStructure' |
|
| 30 | 30 | ], |
| 31 | 31 | ], |
| 32 | 32 | ], |
@@ -96,7 +96,7 @@ discard block |
||
| 96 | 96 | $this->configurationToUseInTestInstance['EXTENSIONS']['dlf'] = $this->getDlfConfiguration(); |
| 97 | 97 | |
| 98 | 98 | if ($this->disableJsonWrappedResponse) { |
| 99 | - $this->frameworkExtensionsToLoad = array_filter($this->frameworkExtensionsToLoad, function ($ext) { |
|
| 99 | + $this->frameworkExtensionsToLoad = array_filter($this->frameworkExtensionsToLoad, function($ext) { |
|
| 100 | 100 | return $ext !== 'Resources/Core/Functional/Extensions/json_response'; |
| 101 | 101 | }); |
| 102 | 102 | } |
@@ -108,9 +108,9 @@ discard block |
||
| 108 | 108 | |
| 109 | 109 | $this->persistenceManager = GeneralUtility::makeInstance(PersistenceManager::class); |
| 110 | 110 | |
| 111 | - $this->baseUrl = 'http://web:8000/public/typo3temp/var/tests/functional-' . $this->identifier . '/'; |
|
| 111 | + $this->baseUrl = 'http://web:8000/public/typo3temp/var/tests/functional-'.$this->identifier.'/'; |
|
| 112 | 112 | $this->httpClient = new HttpClient([ |
| 113 | - 'base_uri' => $this->baseUrl . 'index.php', |
|
| 113 | + 'base_uri' => $this->baseUrl.'index.php', |
|
| 114 | 114 | 'http_errors' => false, |
| 115 | 115 | ]); |
| 116 | 116 | |
@@ -169,13 +169,13 @@ discard block |
||
| 169 | 169 | |
| 170 | 170 | protected function addSiteConfig($identifier) |
| 171 | 171 | { |
| 172 | - $siteConfig = Yaml::parseFile(__DIR__ . '/../Fixtures/siteconfig.yaml'); |
|
| 172 | + $siteConfig = Yaml::parseFile(__DIR__.'/../Fixtures/siteconfig.yaml'); |
|
| 173 | 173 | $siteConfig['base'] = $this->baseUrl; |
| 174 | 174 | $siteConfig['languages'][0]['base'] = $this->baseUrl; |
| 175 | 175 | |
| 176 | - $siteConfigPath = $this->instancePath . '/typo3conf/sites/' . $identifier; |
|
| 176 | + $siteConfigPath = $this->instancePath.'/typo3conf/sites/'.$identifier; |
|
| 177 | 177 | @mkdir($siteConfigPath, 0775, true); |
| 178 | - file_put_contents($siteConfigPath . '/config.yaml', Yaml::dump($siteConfig)); |
|
| 178 | + file_put_contents($siteConfigPath.'/config.yaml', Yaml::dump($siteConfig)); |
|
| 179 | 179 | |
| 180 | 180 | // refresh site cache (otherwise site config is not found) |
| 181 | 181 | $finder = GeneralUtility::makeInstance(\TYPO3\CMS\Core\Site\SiteFinder::class); |
@@ -197,7 +197,7 @@ discard block |
||
| 197 | 197 | $jsonDocuments = json_decode(file_get_contents($path), true); |
| 198 | 198 | |
| 199 | 199 | $updateQuery = $solr->service->createUpdate(); |
| 200 | - $documents = array_map(function ($jsonDoc) use ($updateQuery) { |
|
| 200 | + $documents = array_map(function($jsonDoc) use ($updateQuery) { |
|
| 201 | 201 | $document = $updateQuery->createDocument(); |
| 202 | 202 | foreach ($jsonDoc as $key => $value) { |
| 203 | 203 | $document->setField($key, $value); |