@@ -145,11 +145,11 @@ discard block |
||
| 145 | 145 | if ($doc !== null) { |
| 146 | 146 | $this->document->setCurrentDocument($doc); |
| 147 | 147 | } else { |
| 148 | - $this->logger->error('Failed to load document with record ID "' . $this->requestData['recordId'] . '"'); |
|
| 148 | + $this->logger->error('Failed to load document with record ID "'.$this->requestData['recordId'].'"'); |
|
| 149 | 149 | } |
| 150 | 150 | } |
| 151 | 151 | } else { |
| 152 | - $this->logger->error('Invalid ID "' . $documentId . '" or PID "' . $this->settings['storagePid'] . '" for document loading'); |
|
| 152 | + $this->logger->error('Invalid ID "'.$documentId.'" or PID "'.$this->settings['storagePid'].'" for document loading'); |
|
| 153 | 153 | } |
| 154 | 154 | } |
| 155 | 155 | |
@@ -245,7 +245,7 @@ discard block |
||
| 245 | 245 | && !MathUtility::canBeInterpretedAsInteger($this->requestData['id']) |
| 246 | 246 | && !GeneralUtility::isValidUrl($this->requestData['id']) |
| 247 | 247 | ) { |
| 248 | - $this->logger->warning('Invalid ID or URI "' . $this->requestData['id'] . '" for document loading'); |
|
| 248 | + $this->logger->warning('Invalid ID or URI "'.$this->requestData['id'].'" for document loading'); |
|
| 249 | 249 | unset($this->requestData['id']); |
| 250 | 250 | } |
| 251 | 251 | |
@@ -331,7 +331,7 @@ discard block |
||
| 331 | 331 | $pages = []; |
| 332 | 332 | $pagesSect = []; |
| 333 | 333 | $aRange = []; |
| 334 | - $nRange = 5; // ToDo: should be made configurable |
|
| 334 | + $nRange = 5; // ToDo: should be made configurable |
|
| 335 | 335 | |
| 336 | 336 | // lower limit of the range |
| 337 | 337 | $nBottom = $currentPageNumber - $nRange; |
@@ -346,7 +346,7 @@ discard block |
||
| 346 | 346 | |
| 347 | 347 | // check whether the first screen page is > 1, if yes then points must be added |
| 348 | 348 | if ($aRange[0] > 1) { |
| 349 | - array_push($pagesSect, ['label' => '...','startRecordNumber' => '...']); |
|
| 349 | + array_push($pagesSect, ['label' => '...', 'startRecordNumber' => '...']); |
|
| 350 | 350 | }; |
| 351 | 351 | $lastStartRecordNumberGrid = 0; // due to validity outside the loop |
| 352 | 352 | foreach (range($firstPage, $lastPage) as $i) { |
@@ -389,7 +389,7 @@ discard block |
||
| 389 | 389 | |
| 390 | 390 | // Check if screen page is in range |
| 391 | 391 | if (in_array($i, $aRange)) { |
| 392 | - array_push($pagesSect, ['label' => $i,'startRecordNumber' => $startRecordNumber]); |
|
| 392 | + array_push($pagesSect, ['label' => $i, 'startRecordNumber' => $startRecordNumber]); |
|
| 393 | 393 | }; |
| 394 | 394 | }; |
| 395 | 395 | }; |
@@ -451,7 +451,7 @@ discard block |
||
| 451 | 451 | if ($this->document) { |
| 452 | 452 | $doc = AbstractDocument::getInstance($this->document->getLocation(), $this->settings, true); |
| 453 | 453 | } else { |
| 454 | - $this->logger->error('Invalid UID "' . $documentId . '" or PID "' . $this->settings['storagePid'] . '" for document loading'); |
|
| 454 | + $this->logger->error('Invalid UID "'.$documentId.'" or PID "'.$this->settings['storagePid'].'" for document loading'); |
|
| 455 | 455 | } |
| 456 | 456 | |
| 457 | 457 | return $doc; |
@@ -489,7 +489,7 @@ discard block |
||
| 489 | 489 | |
| 490 | 490 | $this->document->setLocation($documentId); |
| 491 | 491 | } else { |
| 492 | - $this->logger->error('Invalid location given "' . $documentId . '" for document loading'); |
|
| 492 | + $this->logger->error('Invalid location given "'.$documentId.'" for document loading'); |
|
| 493 | 493 | } |
| 494 | 494 | |
| 495 | 495 | return $doc; |
@@ -250,10 +250,10 @@ discard block |
||
| 250 | 250 | if ($root->item(0) instanceof \DOMNode) { |
| 251 | 251 | $mets = $xml->saveXML($root->item(0)); |
| 252 | 252 | } else { |
| 253 | - $this->logger->error('No METS part found in document with location "' . $record['location'] . '"'); |
|
| 253 | + $this->logger->error('No METS part found in document with location "'.$record['location'].'"'); |
|
| 254 | 254 | } |
| 255 | 255 | } else { |
| 256 | - $this->logger->error('Could not load XML file from "' . $record['location'] . '"'); |
|
| 256 | + $this->logger->error('Could not load XML file from "'.$record['location'].'"'); |
|
| 257 | 257 | } |
| 258 | 258 | return $mets; |
| 259 | 259 | } |
@@ -421,7 +421,7 @@ discard block |
||
| 421 | 421 | $pageSettings = $this->configurationManager->getConfiguration($this->configurationManager::CONFIGURATION_TYPE_FULL_TYPOSCRIPT); |
| 422 | 422 | $storagePid = $pageSettings["plugin."]["tx_dlf."]["persistence."]["storagePid"]; |
| 423 | 423 | if ($storagePid > 0) { |
| 424 | - $this->logger->notice('No records found with PID ' . $storagePid); |
|
| 424 | + $this->logger->notice('No records found with PID '.$storagePid); |
|
| 425 | 425 | } else { |
| 426 | 426 | $this->logger->notice('No records found'); |
| 427 | 427 | } |
@@ -504,7 +504,7 @@ discard block |
||
| 504 | 504 | if (!empty($resArray)) { |
| 505 | 505 | // check, if all required fields are available for a given identifier |
| 506 | 506 | foreach ($details['requiredFields'] as $required) { |
| 507 | - $methodName = 'get' . GeneralUtility::underscoredToUpperCamelCase($required); |
|
| 507 | + $methodName = 'get'.GeneralUtility::underscoredToUpperCamelCase($required); |
|
| 508 | 508 | if (empty($resArray->$methodName())) { |
| 509 | 509 | // Skip metadata formats whose requirements are not met. |
| 510 | 510 | continue 2; |
@@ -610,9 +610,9 @@ discard block |
||
| 610 | 610 | $resArray = $result->fetchAssociative(); |
| 611 | 611 | if ($resArray) { |
| 612 | 612 | if ($resArray['index_query'] != "") { |
| 613 | - $solrQuery .= '(' . $resArray['index_query'] . ')'; |
|
| 613 | + $solrQuery .= '('.$resArray['index_query'].')'; |
|
| 614 | 614 | } else { |
| 615 | - $solrQuery .= 'collection:' . '"' . $resArray['index_name'] . '"'; |
|
| 615 | + $solrQuery .= 'collection:'.'"'.$resArray['index_name'].'"'; |
|
| 616 | 616 | } |
| 617 | 617 | } else { |
| 618 | 618 | $this->error = 'noSetHierarchy'; |
@@ -624,7 +624,7 @@ discard block |
||
| 624 | 624 | } |
| 625 | 625 | // Check for required fields. |
| 626 | 626 | foreach ($this->formats[$this->parameters['metadataPrefix']]['requiredFields'] as $required) { |
| 627 | - $solrQuery .= ' NOT ' . $required . ':""'; |
|
| 627 | + $solrQuery .= ' NOT '.$required.':""'; |
|
| 628 | 628 | } |
| 629 | 629 | // toplevel="true" is always required |
| 630 | 630 | $solrQuery .= ' AND toplevel:true'; |
@@ -638,7 +638,7 @@ discard block |
||
| 638 | 638 | return $documentSet; |
| 639 | 639 | } |
| 640 | 640 | |
| 641 | - $solrQuery .= ' AND timestamp:[' . $from . ' TO ' . $until . ']'; |
|
| 641 | + $solrQuery .= ' AND timestamp:['.$from.' TO '.$until.']'; |
|
| 642 | 642 | |
| 643 | 643 | $solr = Solr::getInstance($this->settings['solrcore']); |
| 644 | 644 | if (!$solr->ready) { |
@@ -729,7 +729,7 @@ discard block |
||
| 729 | 729 | */ |
| 730 | 730 | private function getDate(string $dateType) |
| 731 | 731 | { |
| 732 | - return strptime($this->parameters[$dateType], '%Y-%m-%dT%H:%M:%SZ') ?: strptime($this->parameters[$dateType], '%Y-%m-%d'); |
|
| 732 | + return strptime($this->parameters[$dateType], '%Y-%m-%dT%H:%M:%SZ') ? : strptime($this->parameters[$dateType], '%Y-%m-%d'); |
|
| 733 | 733 | } |
| 734 | 734 | |
| 735 | 735 | /** |
@@ -752,7 +752,7 @@ discard block |
||
| 752 | 752 | $date['tm_mday'], |
| 753 | 753 | $date['tm_year'] + 1900 |
| 754 | 754 | ); |
| 755 | - return date("Y-m-d", $timestamp) . 'T' . date("H:i:s", $timestamp) . $end; |
|
| 755 | + return date("Y-m-d", $timestamp).'T'.date("H:i:s", $timestamp).$end; |
|
| 756 | 756 | } |
| 757 | 757 | |
| 758 | 758 | /** |
@@ -865,7 +865,7 @@ discard block |
||
| 865 | 865 | $resumptionTokenInfo['cursor'] = $currentCursor; |
| 866 | 866 | $resumptionTokenInfo['completeListSize'] = $documentListSet['metadata']['completeListSize']; |
| 867 | 867 | $expireDateTime = new \DateTime(); |
| 868 | - $expireDateTime->add(new \DateInterval('PT' . $this->settings['expired'] . 'S')); |
|
| 868 | + $expireDateTime->add(new \DateInterval('PT'.$this->settings['expired'].'S')); |
|
| 869 | 869 | $resumptionTokenInfo['expired'] = $expireDateTime; |
| 870 | 870 | |
| 871 | 871 | $omitResumptionToken = $currentCursor === 0 && $numShownDocuments >= $documentListSet['metadata']['completeListSize']; |
@@ -104,7 +104,7 @@ |
||
| 104 | 104 | $pageOptions = []; |
| 105 | 105 | for ($i = 1; $i <= $this->document->getCurrentDocument()->numPages; $i++) { |
| 106 | 106 | $orderLabel = $this->document->getCurrentDocument()->physicalStructureInfo[$this->document->getCurrentDocument()->physicalStructure[$i]]['orderlabel']; |
| 107 | - $pageOptions[$i] = '[' . $i . ']' . ($orderLabel ? ' - ' . htmlspecialchars($orderLabel) : ''); |
|
| 107 | + $pageOptions[$i] = '['.$i.']'.($orderLabel ? ' - '.htmlspecialchars($orderLabel) : ''); |
|
| 108 | 108 | } |
| 109 | 109 | $this->view->assign('pageOptions', $pageOptions); |
| 110 | 110 | |
@@ -68,7 +68,7 @@ |
||
| 68 | 68 | $pageGridPagination = new PageGridPagination($pageGridPaginator); |
| 69 | 69 | |
| 70 | 70 | $pagination = $this->buildSimplePagination($pageGridPagination, $pageGridPaginator); |
| 71 | - $this->view->assignMultiple([ 'pagination' => $pagination, 'paginator' => $pageGridPaginator ]); |
|
| 71 | + $this->view->assignMultiple(['pagination' => $pagination, 'paginator' => $pageGridPaginator]); |
|
| 72 | 72 | |
| 73 | 73 | $this->view->assign('docUid', $this->requestData['id']); |
| 74 | 74 | } |
@@ -197,7 +197,7 @@ discard block |
||
| 197 | 197 | } |
| 198 | 198 | } |
| 199 | 199 | // Append "IFSUB" to "ITEM_STATE" if this entry has sub-entries. |
| 200 | - $entryArray['ITEM_STATE'] = ($entryArray['ITEM_STATE'] == 'NO' ? 'IFSUB' : $entryArray['ITEM_STATE'] . 'IFSUB'); |
|
| 200 | + $entryArray['ITEM_STATE'] = ($entryArray['ITEM_STATE'] == 'NO' ? 'IFSUB' : $entryArray['ITEM_STATE'].'IFSUB'); |
|
| 201 | 201 | } |
| 202 | 202 | return $entryArray; |
| 203 | 203 | } |
@@ -309,9 +309,9 @@ discard block |
||
| 309 | 309 | $title = ''; |
| 310 | 310 | foreach ($fields as $field) { |
| 311 | 311 | if ($field == 'type') { |
| 312 | - $title .= $this->getTranslatedType($entry['type']) . ' '; |
|
| 312 | + $title .= $this->getTranslatedType($entry['type']).' '; |
|
| 313 | 313 | } else { |
| 314 | - $title .= $entry[$field] . ' '; |
|
| 314 | + $title .= $entry[$field].' '; |
|
| 315 | 315 | } |
| 316 | 316 | } |
| 317 | 317 | |
@@ -319,7 +319,7 @@ discard block |
||
| 319 | 319 | } |
| 320 | 320 | } |
| 321 | 321 | } |
| 322 | - return $entry['label'] ?: $entry['orderlabel']; |
|
| 322 | + return $entry['label'] ? : $entry['orderlabel']; |
|
| 323 | 323 | } |
| 324 | 324 | |
| 325 | 325 | /** |
@@ -352,7 +352,7 @@ discard block |
||
| 352 | 352 | */ |
| 353 | 353 | private function sortSubMenu(array &$menu): void |
| 354 | 354 | { |
| 355 | - usort($menu[0]['_SUB_MENU'], function ($firstElement, $secondElement) { |
|
| 355 | + usort($menu[0]['_SUB_MENU'], function($firstElement, $secondElement) { |
|
| 356 | 356 | if (!empty($firstElement['orderlabel'])) { |
| 357 | 357 | return $firstElement['orderlabel'] <=> $secondElement['orderlabel']; |
| 358 | 358 | } |
@@ -75,7 +75,7 @@ discard block |
||
| 75 | 75 | if ($library) { |
| 76 | 76 | $feedMeta['copyright'] = $library->getLabel(); |
| 77 | 77 | } else { |
| 78 | - $this->logger->error('Failed to fetch label of selected library with "' . $this->settings['library'] . '"'); |
|
| 78 | + $this->logger->error('Failed to fetch label of selected library with "'.$this->settings['library'].'"'); |
|
| 79 | 79 | } |
| 80 | 80 | |
| 81 | 81 | if ( |
@@ -95,12 +95,12 @@ discard block |
||
| 95 | 95 | ) { |
| 96 | 96 | $superiorTitle = AbstractDocument::getTitle($document->getPartof(), true); |
| 97 | 97 | if (!empty($superiorTitle)) { |
| 98 | - $title .= '[' . $superiorTitle . ']'; |
|
| 98 | + $title .= '['.$superiorTitle.']'; |
|
| 99 | 99 | } |
| 100 | 100 | } |
| 101 | 101 | // Get title of document. |
| 102 | 102 | if (!empty($document->getTitle())) { |
| 103 | - $title .= ' ' . $document->getTitle(); |
|
| 103 | + $title .= ' '.$document->getTitle(); |
|
| 104 | 104 | } |
| 105 | 105 | // Set default title if empty. |
| 106 | 106 | if (empty($title)) { |
@@ -108,13 +108,13 @@ discard block |
||
| 108 | 108 | } |
| 109 | 109 | // Append volume information. |
| 110 | 110 | if (!empty($document->getVolume())) { |
| 111 | - $title .= ', ' . LocalizationUtility::translate('volume', 'dlf') . ' ' . $document->getVolume(); |
|
| 111 | + $title .= ', '.LocalizationUtility::translate('volume', 'dlf').' '.$document->getVolume(); |
|
| 112 | 112 | } |
| 113 | 113 | // Is this document new or updated? |
| 114 | 114 | if ($document->getCrdate() == $document->getTstamp()) { |
| 115 | - $title = LocalizationUtility::translate('plugins.feeds.new', 'dlf') . ' ' . trim($title); |
|
| 115 | + $title = LocalizationUtility::translate('plugins.feeds.new', 'dlf').' '.trim($title); |
|
| 116 | 116 | } else { |
| 117 | - $title = LocalizationUtility::translate('plugins.feeds.update', 'dlf') . ' ' . trim($title); |
|
| 117 | + $title = LocalizationUtility::translate('plugins.feeds.update', 'dlf').' '.trim($title); |
|
| 118 | 118 | } |
| 119 | 119 | |
| 120 | 120 | $document->setTitle($title); |
@@ -134,8 +134,8 @@ discard block |
||
| 134 | 134 | $this->view->assign('calendarData', $calendarData); |
| 135 | 135 | $this->view->assign('documentId', $this->document->getUid()); |
| 136 | 136 | $this->view->assign('yearLinkTitle', $yearLinkTitle); |
| 137 | - $this->view->assign('parentDocumentId', $this->document->getPartof() ?: $this->document->getCurrentDocument()->tableOfContents[0]['points']); |
|
| 138 | - $this->view->assign('allYearDocTitle', $this->document->getCurrentDocument()->getTitle($this->document->getPartof()) ?: $this->document->getCurrentDocument()->tableOfContents[0]['label']); |
|
| 137 | + $this->view->assign('parentDocumentId', $this->document->getPartof() ? : $this->document->getCurrentDocument()->tableOfContents[0]['points']); |
|
| 138 | + $this->view->assign('allYearDocTitle', $this->document->getCurrentDocument()->getTitle($this->document->getPartof()) ? : $this->document->getCurrentDocument()->tableOfContents[0]['label']); |
|
| 139 | 139 | } |
| 140 | 140 | |
| 141 | 141 | /** |
@@ -220,7 +220,7 @@ discard block |
||
| 220 | 220 | } |
| 221 | 221 | |
| 222 | 222 | $this->view->assign('documentId', $this->document->getUid()); |
| 223 | - $this->view->assign('allYearDocTitle', $this->document->getCurrentDocument()->getTitle((int) $this->document->getUid()) ?: $this->document->getCurrentDocument()->tableOfContents[0]['label']); |
|
| 223 | + $this->view->assign('allYearDocTitle', $this->document->getCurrentDocument()->getTitle((int) $this->document->getUid()) ? : $this->document->getCurrentDocument()->tableOfContents[0]['label']); |
|
| 224 | 224 | } |
| 225 | 225 | |
| 226 | 226 | /** |
@@ -239,7 +239,7 @@ discard block |
||
| 239 | 239 | protected function getCalendarYear(array &$calendarData, array $calendarIssuesByMonth, int $year, int $firstMonth = 1, int $lastMonth = 12): void |
| 240 | 240 | { |
| 241 | 241 | for ($i = $firstMonth; $i <= $lastMonth; $i++) { |
| 242 | - $key = $year . '-' . $i; |
|
| 242 | + $key = $year.'-'.$i; |
|
| 243 | 243 | |
| 244 | 244 | $calendarData[$key] = [ |
| 245 | 245 | 'DAYMON_NAME' => strftime('%a', strtotime('last Monday')), |
@@ -249,16 +249,16 @@ discard block |
||
| 249 | 249 | 'DAYFRI_NAME' => strftime('%a', strtotime('last Friday')), |
| 250 | 250 | 'DAYSAT_NAME' => strftime('%a', strtotime('last Saturday')), |
| 251 | 251 | 'DAYSUN_NAME' => strftime('%a', strtotime('last Sunday')), |
| 252 | - 'MONTHNAME' => strftime('%B', strtotime($year . '-' . $i . '-1')) . ' ' . $year, |
|
| 252 | + 'MONTHNAME' => strftime('%B', strtotime($year.'-'.$i.'-1')).' '.$year, |
|
| 253 | 253 | 'CALYEAR' => ($i == $firstMonth) ? $year : '' |
| 254 | 254 | ]; |
| 255 | 255 | |
| 256 | - $firstOfMonth = strtotime($year . '-' . $i . '-1'); |
|
| 256 | + $firstOfMonth = strtotime($year.'-'.$i.'-1'); |
|
| 257 | 257 | $lastOfMonth = strtotime('last day of', ($firstOfMonth)); |
| 258 | 258 | $firstOfMonthStart = strtotime('last Monday', $firstOfMonth); |
| 259 | 259 | // There are never more than 6 weeks in a month. |
| 260 | 260 | for ($j = 0; $j <= 5; $j++) { |
| 261 | - $firstDayOfWeek = strtotime('+ ' . $j . ' Week', $firstOfMonthStart); |
|
| 261 | + $firstDayOfWeek = strtotime('+ '.$j.' Week', $firstOfMonthStart); |
|
| 262 | 262 | |
| 263 | 263 | $calendarData[$key]['week'][$j] = [ |
| 264 | 264 | 'DAYMON' => ['dayValue' => ' '], |
@@ -271,7 +271,7 @@ discard block |
||
| 271 | 271 | ]; |
| 272 | 272 | // Every week has seven days. ;-) |
| 273 | 273 | for ($k = 0; $k <= 6; $k++) { |
| 274 | - $currentDayTime = strtotime('+ ' . $k . ' Day', $firstDayOfWeek); |
|
| 274 | + $currentDayTime = strtotime('+ '.$k.' Day', $firstDayOfWeek); |
|
| 275 | 275 | if ( |
| 276 | 276 | $currentDayTime >= $firstOfMonth |
| 277 | 277 | && $currentDayTime <= $lastOfMonth |
@@ -342,7 +342,7 @@ discard block |
||
| 342 | 342 | */ |
| 343 | 343 | private function fillCalendar(array &$calendarData, int $currentDayTime, string $dayLinks, array $dayLinkDiv, int $firstDayOfWeek, int $k): void |
| 344 | 344 | { |
| 345 | - switch (strftime('%w', strtotime('+ ' . $k . ' Day', $firstDayOfWeek))) { |
|
| 345 | + switch (strftime('%w', strtotime('+ '.$k.' Day', $firstDayOfWeek))) { |
|
| 346 | 346 | case '0': |
| 347 | 347 | $this->fillDay($calendarData, $currentDayTime, 'DAYSUN', $dayLinks, $dayLinkDiv); |
| 348 | 348 | break; |
@@ -446,7 +446,7 @@ discard block |
||
| 446 | 446 | $_day = date('j', $dateTimestamp); |
| 447 | 447 | $issuesByYear[$_year][$_month][$_day][] = $issue; |
| 448 | 448 | } else { |
| 449 | - $this->logger->warning('Document with UID ' . $issue['uid'] . 'has no valid date of publication'); |
|
| 449 | + $this->logger->warning('Document with UID '.$issue['uid'].'has no valid date of publication'); |
|
| 450 | 450 | } |
| 451 | 451 | } |
| 452 | 452 | // Sort by years. |
@@ -489,7 +489,7 @@ discard block |
||
| 489 | 489 | foreach ($year['children'] as $month) { |
| 490 | 490 | foreach ($month['children'] as $day) { |
| 491 | 491 | foreach ($day['children'] as $issue) { |
| 492 | - $title = $issue['label'] ?: $issue['orderlabel']; |
|
| 492 | + $title = $issue['label'] ? : $issue['orderlabel']; |
|
| 493 | 493 | if (strtotime($title) !== false) { |
| 494 | 494 | $title = strftime('%x', strtotime($title)); |
| 495 | 495 | } |
@@ -133,7 +133,7 @@ discard block |
||
| 133 | 133 | foreach ($this->requestData['selected'] as $docValue) { |
| 134 | 134 | if ($docValue['id']) { |
| 135 | 135 | $docData = $this->getDocumentData((int) $docValue['id'], $docValue); |
| 136 | - $pdfUrl .= $docData['urlParams'] . $this->settings['pdfparamseparator']; |
|
| 136 | + $pdfUrl .= $docData['urlParams'].$this->settings['pdfparamseparator']; |
|
| 137 | 137 | $this->redirectToUri($pdfUrl); |
| 138 | 138 | } |
| 139 | 139 | } |
@@ -200,7 +200,7 @@ discard block |
||
| 200 | 200 | if ($allMails->count() > 0) { |
| 201 | 201 | $mailSelect[0] = htmlspecialchars(LocalizationUtility::translate('basket.chooseMail', 'dlf')); |
| 202 | 202 | foreach ($allMails as $mail) { |
| 203 | - $mailSelect[$mail->getUid()] = htmlspecialchars($mail->getName()) . ' (' . htmlspecialchars($mail->getMail()) . ')'; |
|
| 203 | + $mailSelect[$mail->getUid()] = htmlspecialchars($mail->getName()).' ('.htmlspecialchars($mail->getMail()).')'; |
|
| 204 | 204 | } |
| 205 | 205 | $this->view->assign('mailSelect', $mailSelect); |
| 206 | 206 | } |
@@ -292,12 +292,12 @@ discard block |
||
| 292 | 292 | |
| 293 | 293 | $entryArray['BASKETDATA'] = $docData; |
| 294 | 294 | |
| 295 | - $entryKey = $id . '_' . $startpage; |
|
| 295 | + $entryKey = $id.'_'.$startpage; |
|
| 296 | 296 | if (!empty($startX)) { |
| 297 | - $entryKey .= '_' . $startX; |
|
| 297 | + $entryKey .= '_'.$startX; |
|
| 298 | 298 | } |
| 299 | 299 | if (!empty($endX)) { |
| 300 | - $entryKey .= '_' . $endX; |
|
| 300 | + $entryKey .= '_'.$endX; |
|
| 301 | 301 | } |
| 302 | 302 | |
| 303 | 303 | $entryArray['id'] = $id; |
@@ -353,7 +353,7 @@ discard block |
||
| 353 | 353 | $urlParams = str_replace("##endy##", $data['endY'] === "" ? "" : (int) $data['endY'], $urlParams); |
| 354 | 354 | $urlParams = str_replace("##rotation##", $data['rotation'] === "" ? "" : (int) $data['rotation'], $urlParams); |
| 355 | 355 | |
| 356 | - $downloadUrl = $this->settings['pdfgenerate'] . $urlParams; |
|
| 356 | + $downloadUrl = $this->settings['pdfgenerate'].$urlParams; |
|
| 357 | 357 | |
| 358 | 358 | $title = $this->document->getTitle(); |
| 359 | 359 | if (empty($title)) { |
@@ -364,15 +364,15 @@ discard block |
||
| 364 | 364 | $info = ''; |
| 365 | 365 | if ($data['startX'] != '' && $data['endX'] != '') { |
| 366 | 366 | // cutout |
| 367 | - $info .= htmlspecialchars(LocalizationUtility::translate('basket.cutout', 'dlf')) . ' '; |
|
| 367 | + $info .= htmlspecialchars(LocalizationUtility::translate('basket.cutout', 'dlf')).' '; |
|
| 368 | 368 | } |
| 369 | 369 | if ($data['startpage'] == $data['endpage']) { |
| 370 | 370 | // One page |
| 371 | - $info .= htmlspecialchars(LocalizationUtility::translate('page', 'dlf')) . ' ' . $data['startpage']; |
|
| 371 | + $info .= htmlspecialchars(LocalizationUtility::translate('page', 'dlf')).' '.$data['startpage']; |
|
| 372 | 372 | } else { |
| 373 | - $info .= htmlspecialchars(LocalizationUtility::translate('page', 'dlf')) . ' ' . $data['startpage'] . '-' . $data['endpage']; |
|
| 373 | + $info .= htmlspecialchars(LocalizationUtility::translate('page', 'dlf')).' '.$data['startpage'].'-'.$data['endpage']; |
|
| 374 | 374 | } |
| 375 | - $downloadLink = '<a href="' . $downloadUrl . '" target="_blank">' . htmlspecialchars($title) . '</a> (' . $info . ')'; |
|
| 375 | + $downloadLink = '<a href="'.$downloadUrl.'" target="_blank">'.htmlspecialchars($title).'</a> ('.$info.')'; |
|
| 376 | 376 | if ($data['startpage'] == $data['endpage']) { |
| 377 | 377 | $pageNums = 1; |
| 378 | 378 | } else { |
@@ -445,12 +445,12 @@ discard block |
||
| 445 | 445 | if ($piVars['addToBasket'] == 'list') { |
| 446 | 446 | $documentItem['endpage'] = $this->document->getCurrentDocument()->numPages; |
| 447 | 447 | } |
| 448 | - $arrayKey = $documentItem['id'] . '_' . $page; |
|
| 448 | + $arrayKey = $documentItem['id'].'_'.$page; |
|
| 449 | 449 | if (!empty($documentItem['startX'])) { |
| 450 | - $arrayKey .= '_' . $documentItem['startX']; |
|
| 450 | + $arrayKey .= '_'.$documentItem['startX']; |
|
| 451 | 451 | } |
| 452 | 452 | if (!empty($documentItem['endX'])) { |
| 453 | - $arrayKey .= '_' . $documentItem['endX']; |
|
| 453 | + $arrayKey .= '_'.$documentItem['endX']; |
|
| 454 | 454 | } |
| 455 | 455 | // do not add more than one identical object |
| 456 | 456 | if (!in_array($arrayKey, $items)) { |
@@ -471,14 +471,14 @@ discard block |
||
| 471 | 471 | // remove parameter endpage |
| 472 | 472 | $pdfParams = str_replace(",##endpage##", '', $pdfParams); |
| 473 | 473 | } |
| 474 | - $pdfGenerateUrl = $this->settings['pdfgenerate'] . $pdfParams; |
|
| 474 | + $pdfGenerateUrl = $this->settings['pdfgenerate'].$pdfParams; |
|
| 475 | 475 | if ($this->settings['pregeneration']) { |
| 476 | 476 | // send ajax request to webapp |
| 477 | 477 | $output .= ' |
| 478 | 478 | <script> |
| 479 | 479 | $(document).ready(function(){ |
| 480 | 480 | $.ajax({ |
| 481 | - url: "' . $pdfGenerateUrl . '", |
|
| 481 | + url: "' . $pdfGenerateUrl.'", |
|
| 482 | 482 | }).done(function() { |
| 483 | 483 | }); |
| 484 | 484 | }); |
@@ -516,12 +516,12 @@ discard block |
||
| 516 | 516 | } |
| 517 | 517 | foreach ($piVars['selected'] as $value) { |
| 518 | 518 | if (isset($value['id'])) { |
| 519 | - $arrayKey = $value['id'] . '_' . $value['startpage']; |
|
| 519 | + $arrayKey = $value['id'].'_'.$value['startpage']; |
|
| 520 | 520 | if (!empty($value['startX'])) { |
| 521 | - $arrayKey .= '_' . $value['startX']; |
|
| 521 | + $arrayKey .= '_'.$value['startX']; |
|
| 522 | 522 | } |
| 523 | 523 | if (!empty($value['endX'])) { |
| 524 | - $arrayKey .= '_' . $value['endX']; |
|
| 524 | + $arrayKey .= '_'.$value['endX']; |
|
| 525 | 525 | } |
| 526 | 526 | if (isset($items[$arrayKey])) { |
| 527 | 527 | unset($items[$arrayKey]); |
@@ -554,7 +554,7 @@ discard block |
||
| 554 | 554 | |
| 555 | 555 | $mailObject = $this->mailRepository->findByUid(intval($mailId))->getFirst(); |
| 556 | 556 | |
| 557 | - $mailText = htmlspecialchars(LocalizationUtility::translate('basket.mailBody', 'dlf')) . "\n"; |
|
| 557 | + $mailText = htmlspecialchars(LocalizationUtility::translate('basket.mailBody', 'dlf'))."\n"; |
|
| 558 | 558 | $numberOfPages = 0; |
| 559 | 559 | $pdfUrl = $this->settings['pdfdownload']; |
| 560 | 560 | // prepare links |
@@ -562,7 +562,7 @@ discard block |
||
| 562 | 562 | if ($docValue['id']) { |
| 563 | 563 | $explodeId = explode("_", $docValue['id']); |
| 564 | 564 | $docData = $this->getDocumentData((int) $explodeId[0], $docValue); |
| 565 | - $pdfUrl .= $docData['urlParams'] . $this->settings['pdfparamseparator']; |
|
| 565 | + $pdfUrl .= $docData['urlParams'].$this->settings['pdfparamseparator']; |
|
| 566 | 566 | $pages = (abs(intval($docValue['startpage']) - intval($docValue['endpage']))); |
| 567 | 567 | if ($pages === 0) { |
| 568 | 568 | $numberOfPages = $numberOfPages + 1; |
@@ -573,7 +573,7 @@ discard block |
||
| 573 | 573 | } |
| 574 | 574 | // Remove leading/tailing pdfparamseperator |
| 575 | 575 | $pdfUrl = trim($pdfUrl, $this->settings['pdfparamseparator']); |
| 576 | - $mailBody = $mailText . $pdfUrl; |
|
| 576 | + $mailBody = $mailText.$pdfUrl; |
|
| 577 | 577 | // Get hook objects. |
| 578 | 578 | $hookObjects = Helper::getHookObjects('Classes/Controller/BasketController.php'); |
| 579 | 579 | // Hook for getting a customized mail body. |
@@ -600,7 +600,7 @@ discard block |
||
| 600 | 600 | $newActionLog = GeneralUtility::makeInstance(ActionLog::class); |
| 601 | 601 | $newActionLog->setFileName($pdfUrl); |
| 602 | 602 | $newActionLog->setCountPages($numberOfPages); |
| 603 | - $newActionLog->setLabel('Mail: ' . $mailObject->getMail()); |
|
| 603 | + $newActionLog->setLabel('Mail: '.$mailObject->getMail()); |
|
| 604 | 604 | |
| 605 | 605 | if ($GLOBALS["TSFE"]->loginUser) { |
| 606 | 606 | // internal user |
@@ -631,7 +631,7 @@ discard block |
||
| 631 | 631 | foreach ($this->requestData['selected'] as $docId => $docValue) { |
| 632 | 632 | if ($docValue['id']) { |
| 633 | 633 | $docData = $this->getDocumentData((int) $docValue['id'], $docValue); |
| 634 | - $pdfUrl .= $docData['urlParams'] . $this->settings['pdfparamseparator']; |
|
| 634 | + $pdfUrl .= $docData['urlParams'].$this->settings['pdfparamseparator']; |
|
| 635 | 635 | $numberOfPages += $docData['pageNums']; |
| 636 | 636 | } |
| 637 | 637 | } |
@@ -649,7 +649,7 @@ discard block |
||
| 649 | 649 | if ($docValue['id']) { |
| 650 | 650 | $explodeId = explode("_", $docId); |
| 651 | 651 | $docData = $this->getDocumentData((int) $explodeId[0], $docValue); |
| 652 | - $pdfUrl .= $docData['urlParams'] . $this->settings['pdfparamseparator']; |
|
| 652 | + $pdfUrl .= $docData['urlParams'].$this->settings['pdfparamseparator']; |
|
| 653 | 653 | $numberOfPages += $docData['pageNums']; |
| 654 | 654 | } |
| 655 | 655 | } |
@@ -666,12 +666,12 @@ discard block |
||
| 666 | 666 | // internal user |
| 667 | 667 | $actionLog->setUserId($GLOBALS["TSFE"]->fe_user->user['uid']); |
| 668 | 668 | $actionLog->setName($GLOBALS["TSFE"]->fe_user->user['username']); |
| 669 | - $actionLog->setLabel('Print: ' . $printer->getLabel()); |
|
| 669 | + $actionLog->setLabel('Print: '.$printer->getLabel()); |
|
| 670 | 670 | } else { |
| 671 | 671 | // external user |
| 672 | 672 | $actionLog->setUserId(0); |
| 673 | 673 | $actionLog->setName('n/a'); |
| 674 | - $actionLog->setLabel('Print: ' . $printer->getLabel()); |
|
| 674 | + $actionLog->setLabel('Print: '.$printer->getLabel()); |
|
| 675 | 675 | } |
| 676 | 676 | // add action to protocol |
| 677 | 677 | $this->actionLogRepository->add($actionLog); |
@@ -167,7 +167,7 @@ discard block |
||
| 167 | 167 | $simplePagination = new SimplePagination($solrPaginator); |
| 168 | 168 | |
| 169 | 169 | $pagination = $this->buildSimplePagination($simplePagination, $solrPaginator); |
| 170 | - $this->view->assignMultiple([ 'pagination' => $pagination, 'paginator' => $solrPaginator ]); |
|
| 170 | + $this->view->assignMultiple(['pagination' => $pagination, 'paginator' => $solrPaginator]); |
|
| 171 | 171 | } |
| 172 | 172 | |
| 173 | 173 | $this->view->assign('viewData', $this->viewData); |
@@ -219,20 +219,20 @@ discard block |
||
| 219 | 219 | foreach ($collections as $collection) { |
| 220 | 220 | $solr_query = ''; |
| 221 | 221 | if ($collection->getIndexSearch() != '') { |
| 222 | - $solr_query .= '(' . $collection->getIndexSearch() . ')'; |
|
| 222 | + $solr_query .= '('.$collection->getIndexSearch().')'; |
|
| 223 | 223 | } else { |
| 224 | - $solr_query .= 'collection:("' . Solr::escapeQuery($collection->getIndexName()) . '")'; |
|
| 224 | + $solr_query .= 'collection:("'.Solr::escapeQuery($collection->getIndexName()).'")'; |
|
| 225 | 225 | } |
| 226 | 226 | |
| 227 | 227 | // virtual collection might yield documents, that are not toplevel true or partof anything |
| 228 | 228 | if ($collection->getIndexSearch()) { |
| 229 | 229 | $params['query'] = $solr_query; |
| 230 | 230 | } else { |
| 231 | - $params['query'] = $solr_query . ' AND partof:0 AND toplevel:true'; |
|
| 231 | + $params['query'] = $solr_query.' AND partof:0 AND toplevel:true'; |
|
| 232 | 232 | } |
| 233 | 233 | $partOfNothing = $solr->searchRaw($params); |
| 234 | 234 | |
| 235 | - $params['query'] = $solr_query . ' AND NOT partof:0 AND toplevel:true'; |
|
| 235 | + $params['query'] = $solr_query.' AND NOT partof:0 AND toplevel:true'; |
|
| 236 | 236 | $partOfSomething = $solr->searchRaw($params); |
| 237 | 237 | |
| 238 | 238 | $collectionInfo = []; |