@@ -91,12 +91,12 @@ |
||
91 | 91 | $solr = Solr::getInstance($input->getOption('solr')); |
92 | 92 | // Connect to Solr server. |
93 | 93 | if (!$solr->ready) { |
94 | - $io->error('ERROR: Connection to Solr core ("' . $input->getOption('solr') . '") not possible \n'); |
|
94 | + $io->error('ERROR: Connection to Solr core ("'.$input->getOption('solr').'") not possible \n'); |
|
95 | 95 | return BaseCommand::FAILURE; |
96 | 96 | } |
97 | 97 | |
98 | 98 | if (!$solr->optimize($input->getOption('commit'), $input->getOption('optimize'))) { |
99 | - $io->error('ERROR: Optimizing the Solr core ("' . $input->getOption('solr') . '") not possible \n'); |
|
99 | + $io->error('ERROR: Optimizing the Solr core ("'.$input->getOption('solr').'") not possible \n'); |
|
100 | 100 | return BaseCommand::FAILURE; |
101 | 101 | } |
102 | 102 |
@@ -149,10 +149,10 @@ discard block |
||
149 | 149 | ) { |
150 | 150 | // Get current configuration. |
151 | 151 | $result = $queryBuilder |
152 | - ->select($table . '.is_listed AS is_listed') |
|
152 | + ->select($table.'.is_listed AS is_listed') |
|
153 | 153 | ->from($table) |
154 | 154 | ->where( |
155 | - $queryBuilder->expr()->eq($table . '.uid', (int) $id), |
|
155 | + $queryBuilder->expr()->eq($table.'.uid', (int) $id), |
|
156 | 156 | Helper::whereExpression($table) |
157 | 157 | ) |
158 | 158 | ->setMaxResults(1) |
@@ -175,10 +175,10 @@ discard block |
||
175 | 175 | ) { |
176 | 176 | // Get current configuration. |
177 | 177 | $result = $queryBuilder |
178 | - ->select($table . '.index_autocomplete AS index_autocomplete') |
|
178 | + ->select($table.'.index_autocomplete AS index_autocomplete') |
|
179 | 179 | ->from($table) |
180 | 180 | ->where( |
181 | - $queryBuilder->expr()->eq($table . '.uid', (int) $id), |
|
181 | + $queryBuilder->expr()->eq($table.'.uid', (int) $id), |
|
182 | 182 | Helper::whereExpression($table) |
183 | 183 | ) |
184 | 184 | ->setMaxResults(1) |
@@ -348,7 +348,7 @@ discard block |
||
348 | 348 | if ($solr->ready) { |
349 | 349 | // Delete Solr document. |
350 | 350 | $updateQuery = $solr->service->createUpdate(); |
351 | - $updateQuery->addDeleteQuery('uid:' . (int) $id); |
|
351 | + $updateQuery->addDeleteQuery('uid:'.(int) $id); |
|
352 | 352 | $updateQuery->addCommit(false); |
353 | 353 | $solr->service->update($updateQuery); |
354 | 354 | } |
@@ -371,7 +371,7 @@ discard block |
||
371 | 371 | $document->setCurrentDocument($doc); |
372 | 372 | Indexer::add($document, $this->getDocumentRepository()); |
373 | 373 | } else { |
374 | - $this->logger->error('Failed to re-index document with UID ' . (string) $id); |
|
374 | + $this->logger->error('Failed to re-index document with UID '.(string) $id); |
|
375 | 375 | } |
376 | 376 | } |
377 | 377 | |
@@ -422,7 +422,7 @@ discard block |
||
422 | 422 | try { |
423 | 423 | $response = $solr->service->coreAdmin($query); |
424 | 424 | if ($response->getWasSuccessful() == false) { |
425 | - $this->logger->warning('Core ' . $resArray['core'] . ' could not be deleted from Apache Solr'); |
|
425 | + $this->logger->warning('Core '.$resArray['core'].' could not be deleted from Apache Solr'); |
|
426 | 426 | } |
427 | 427 | } catch (\Exception $e) { |
428 | 428 | $this->logger->warning($e->getMessage()); |
@@ -62,7 +62,7 @@ discard block |
||
62 | 62 | |
63 | 63 | if (isset($submittedData['doc']) && empty($submittedData['doc'])) { |
64 | 64 | Helper::addMessage( |
65 | - Helper::getLanguageService()->getLL('additionalFields.doc') . ' ' . Helper::getLanguageService()->getLL('additionalFields.valid'), |
|
65 | + Helper::getLanguageService()->getLL('additionalFields.doc').' '.Helper::getLanguageService()->getLL('additionalFields.valid'), |
|
66 | 66 | $messageTitle, |
67 | 67 | $messageSeverity, |
68 | 68 | true, |
@@ -73,7 +73,7 @@ discard block |
||
73 | 73 | |
74 | 74 | if ((isset($submittedData['pid']) && (int) $submittedData['pid'] <= 0)) { |
75 | 75 | Helper::addMessage( |
76 | - Helper::getLanguageService()->getLL('additionalFields.pid') . ' ' . Helper::getLanguageService()->getLL('additionalFields.valid'), |
|
76 | + Helper::getLanguageService()->getLL('additionalFields.pid').' '.Helper::getLanguageService()->getLL('additionalFields.valid'), |
|
77 | 77 | $messageTitle, |
78 | 78 | $messageSeverity, |
79 | 79 | true, |
@@ -100,7 +100,7 @@ discard block |
||
100 | 100 | |
101 | 101 | if ((isset($submittedData['lib']) && (int) $submittedData['lib'] <= 0)) { |
102 | 102 | Helper::addMessage( |
103 | - Helper::getLanguageService()->getLL('additionalFields.lib') . ' ' . Helper::getLanguageService()->getLL('additionalFields.valid'), |
|
103 | + Helper::getLanguageService()->getLL('additionalFields.lib').' '.Helper::getLanguageService()->getLL('additionalFields.valid'), |
|
104 | 104 | $messageTitle, |
105 | 105 | $messageSeverity, |
106 | 106 | true, |
@@ -111,7 +111,7 @@ discard block |
||
111 | 111 | |
112 | 112 | if ((isset($submittedData['solr']) && (int) $submittedData['solr'] <= 0) || !isset($submittedData['solr'])) { |
113 | 113 | Helper::addMessage( |
114 | - Helper::getLanguageService()->getLL('additionalFields.solr') . ' ' . Helper::getLanguageService()->getLL('additionalFields.valid'), |
|
114 | + Helper::getLanguageService()->getLL('additionalFields.solr').' '.Helper::getLanguageService()->getLL('additionalFields.valid'), |
|
115 | 115 | $messageTitle, |
116 | 116 | $messageSeverity, |
117 | 117 | true, |
@@ -192,8 +192,8 @@ discard block |
||
192 | 192 | protected function getDryRunField(bool $dryRun): array |
193 | 193 | { |
194 | 194 | $fieldName = 'dryRun'; |
195 | - $fieldId = 'task_' . $fieldName; |
|
196 | - $fieldHtml = '<input type="checkbox" name="tx_scheduler[' . $fieldName . ']" id="' . $fieldId . '" value="1"' . ($dryRun ? ' checked="checked"' : '') . '>'; |
|
195 | + $fieldId = 'task_'.$fieldName; |
|
196 | + $fieldHtml = '<input type="checkbox" name="tx_scheduler['.$fieldName.']" id="'.$fieldId.'" value="1"'.($dryRun ? ' checked="checked"' : '').'>'; |
|
197 | 197 | return [ |
198 | 198 | 'code' => $fieldHtml, |
199 | 199 | 'label' => 'LLL:EXT:dlf/Resources/Private/Language/locallang_tasks.xlf:additionalFields.dryRun', |
@@ -215,15 +215,15 @@ discard block |
||
215 | 215 | protected function getSolrField(int $solr, int $pid = null): array |
216 | 216 | { |
217 | 217 | $fieldName = 'solr'; |
218 | - $fieldId = 'task_' . $fieldName; |
|
218 | + $fieldId = 'task_'.$fieldName; |
|
219 | 219 | |
220 | 220 | $allSolrCores = $this->getSolrCores($pid); |
221 | 221 | $options = []; |
222 | 222 | $options[] = '<option value="-1"></option>'; |
223 | 223 | foreach ($allSolrCores as $label => $uid) { |
224 | - $options[] = '<option value="' . $uid . '" ' . ($solr == $uid ? 'selected' : '') . ' >' . $label . '</option>'; |
|
224 | + $options[] = '<option value="'.$uid.'" '.($solr == $uid ? 'selected' : '').' >'.$label.'</option>'; |
|
225 | 225 | }; |
226 | - $fieldHtml = '<select name="tx_scheduler[' . $fieldName . ']" id="' . $fieldId . '">' . implode("\n", $options) . '</select>'; |
|
226 | + $fieldHtml = '<select name="tx_scheduler['.$fieldName.']" id="'.$fieldId.'">'.implode("\n", $options).'</select>'; |
|
227 | 227 | return [ |
228 | 228 | 'code' => $fieldHtml, |
229 | 229 | 'label' => 'LLL:EXT:dlf/Resources/Private/Language/locallang_tasks.xlf:additionalFields.solr', |
@@ -244,7 +244,7 @@ discard block |
||
244 | 244 | protected function getPidField(int $pid): array |
245 | 245 | { |
246 | 246 | $fieldName = 'pid'; |
247 | - $fieldId = 'task_' . $fieldName; |
|
247 | + $fieldId = 'task_'.$fieldName; |
|
248 | 248 | |
249 | 249 | $pageRepository = GeneralUtility::makeInstance(PageTreeRepository::class); |
250 | 250 | $pages = $pageRepository->getTree(0); |
@@ -252,11 +252,11 @@ discard block |
||
252 | 252 | $options = []; |
253 | 253 | foreach ($pages['_children'] as $page) { |
254 | 254 | if ($page['doktype'] == 254) { |
255 | - $options[] = '<option value="' . $page['uid'] . '" ' . ($pid == $page['uid'] ? 'selected' : '') . ' >' . $page['title'] . '</option>'; |
|
255 | + $options[] = '<option value="'.$page['uid'].'" '.($pid == $page['uid'] ? 'selected' : '').' >'.$page['title'].'</option>'; |
|
256 | 256 | } |
257 | 257 | } |
258 | 258 | |
259 | - $fieldHtml = '<select name="tx_scheduler[' . $fieldName . ']" id="' . $fieldId . '">' . implode("\n", $options) . '</select>'; |
|
259 | + $fieldHtml = '<select name="tx_scheduler['.$fieldName.']" id="'.$fieldId.'">'.implode("\n", $options).'</select>'; |
|
260 | 260 | return [ |
261 | 261 | 'code' => $fieldHtml, |
262 | 262 | 'label' => 'LLL:EXT:dlf/Resources/Private/Language/locallang_tasks.xlf:additionalFields.pid', |
@@ -277,8 +277,8 @@ discard block |
||
277 | 277 | protected function getOwnerField(string $owner): array |
278 | 278 | { |
279 | 279 | $fieldName = 'owner'; |
280 | - $fieldId = 'task_' . $fieldName; |
|
281 | - $fieldHtml = '<input type="text" name="tx_scheduler[' . $fieldName . ']" id="' . $fieldId . '" value="' . $owner . '" >'; |
|
280 | + $fieldId = 'task_'.$fieldName; |
|
281 | + $fieldHtml = '<input type="text" name="tx_scheduler['.$fieldName.']" id="'.$fieldId.'" value="'.$owner.'" >'; |
|
282 | 282 | return [ |
283 | 283 | 'code' => $fieldHtml, |
284 | 284 | 'label' => 'LLL:EXT:dlf/Resources/Private/Language/locallang_tasks.xlf:additionalFields.owner', |
@@ -312,7 +312,7 @@ discard block |
||
312 | 312 | $result = $queryBuilder->execute(); |
313 | 313 | |
314 | 314 | while ($record = $result->fetchAssociative()) { |
315 | - $solrCores[$record['label'] . ' (' . $record['index_name'] . ')'] = $record['uid']; |
|
315 | + $solrCores[$record['label'].' ('.$record['index_name'].')'] = $record['uid']; |
|
316 | 316 | } |
317 | 317 | |
318 | 318 | return $solrCores; |
@@ -330,8 +330,8 @@ discard block |
||
330 | 330 | protected function getSoftCommitField(bool $softCommit): array |
331 | 331 | { |
332 | 332 | $fieldName = 'softCommit'; |
333 | - $fieldId = 'task_' . $fieldName; |
|
334 | - $fieldHtml = '<input type="checkbox" name="tx_scheduler[' . $fieldName . ']" id="' . $fieldId . '" value="1"' . ($softCommit ? ' checked="checked"' : '') . '>'; |
|
333 | + $fieldId = 'task_'.$fieldName; |
|
334 | + $fieldHtml = '<input type="checkbox" name="tx_scheduler['.$fieldName.']" id="'.$fieldId.'" value="1"'.($softCommit ? ' checked="checked"' : '').'>'; |
|
335 | 335 | return [ |
336 | 336 | 'code' => $fieldHtml, |
337 | 337 | 'label' => 'LLL:EXT:dlf/Resources/Private/Language/locallang_tasks.xlf:additionalFields.softCommit', |
@@ -59,8 +59,8 @@ |
||
59 | 59 | |
60 | 60 | // Text field for document URL |
61 | 61 | $fieldName = 'doc'; |
62 | - $fieldId = 'task_' . $fieldName; |
|
63 | - $fieldHtml = '<input type="text" name="tx_scheduler[' . $fieldName . ']" id="' . $fieldId . '" value="' . $taskInfo[$fieldName] . '" >'; |
|
62 | + $fieldId = 'task_'.$fieldName; |
|
63 | + $fieldHtml = '<input type="text" name="tx_scheduler['.$fieldName.']" id="'.$fieldId.'" value="'.$taskInfo[$fieldName].'" >'; |
|
64 | 64 | $additionalFields[$fieldId] = [ |
65 | 65 | 'code' => $fieldHtml, |
66 | 66 | 'label' => 'LLL:EXT:dlf/Resources/Private/Language/locallang_tasks.xlf:additionalFields.doc', |
@@ -57,8 +57,8 @@ discard block |
||
57 | 57 | |
58 | 58 | // Checkbox for commit |
59 | 59 | $fieldName = 'commit'; |
60 | - $fieldId = 'task_' . $fieldName; |
|
61 | - $fieldHtml = '<input type="checkbox" name="tx_scheduler[' . $fieldName . ']" id="' . $fieldId . '" value="1"' . ($taskInfo['commit'] ? ' checked="checked"' : '') . '>'; |
|
60 | + $fieldId = 'task_'.$fieldName; |
|
61 | + $fieldHtml = '<input type="checkbox" name="tx_scheduler['.$fieldName.']" id="'.$fieldId.'" value="1"'.($taskInfo['commit'] ? ' checked="checked"' : '').'>'; |
|
62 | 62 | $additionalFields[$fieldId] = [ |
63 | 63 | 'code' => $fieldHtml, |
64 | 64 | 'label' => 'LLL:EXT:dlf/Resources/Private/Language/locallang_tasks.xlf:additionalFields.commit', |
@@ -68,8 +68,8 @@ discard block |
||
68 | 68 | |
69 | 69 | // Checkbox for optimize |
70 | 70 | $fieldName = 'optimize'; |
71 | - $fieldId = 'task_' . $fieldName; |
|
72 | - $fieldHtml = '<input type="checkbox" name="tx_scheduler[' . $fieldName . ']" id="' . $fieldId . '" value="1"' . ($taskInfo['optimize'] ? ' checked="checked"' : '') . '>'; |
|
71 | + $fieldId = 'task_'.$fieldName; |
|
72 | + $fieldHtml = '<input type="checkbox" name="tx_scheduler['.$fieldName.']" id="'.$fieldId.'" value="1"'.($taskInfo['optimize'] ? ' checked="checked"' : '').'>'; |
|
73 | 73 | $additionalFields[$fieldId] = [ |
74 | 74 | 'code' => $fieldHtml, |
75 | 75 | 'label' => 'LLL:EXT:dlf/Resources/Private/Language/locallang_tasks.xlf:additionalFields.optimize', |
@@ -106,7 +106,7 @@ discard block |
||
106 | 106 | $this->renderToolByName('renderScoreTool'); |
107 | 107 | break; |
108 | 108 | default: |
109 | - $this->logger->warning('Incorrect tool configuration: "' . $this->settings['tools'] . '". Tool "' . $tool . '" does not exist.'); |
|
109 | + $this->logger->warning('Incorrect tool configuration: "'.$this->settings['tools'].'". Tool "'.$tool.'" does not exist.'); |
|
110 | 110 | } |
111 | 111 | } |
112 | 112 | } |
@@ -318,7 +318,7 @@ discard block |
||
318 | 318 | $file['url'] = $this->currentDocument->getDownloadLocation($fileId); |
319 | 319 | $file['mimetype'] = $this->currentDocument->getFileMimeType($fileId); |
320 | 320 | } else { |
321 | - $this->logger->warning('File not found in fileGrp "' . $fileGrp . '"'); |
|
321 | + $this->logger->warning('File not found in fileGrp "'.$fileGrp.'"'); |
|
322 | 322 | } |
323 | 323 | } |
324 | 324 | return $file; |
@@ -426,7 +426,7 @@ discard block |
||
426 | 426 | empty($firstPageLink) |
427 | 427 | && empty($secondPageLink) |
428 | 428 | ) { |
429 | - $this->logger->warning('File not found in fileGrps "' . $this->extConf['files']['fileGrpDownload'] . '"'); |
|
429 | + $this->logger->warning('File not found in fileGrps "'.$this->extConf['files']['fileGrpDownload'].'"'); |
|
430 | 430 | } |
431 | 431 | |
432 | 432 | if (!empty($firstPageLink)) { |
@@ -464,7 +464,7 @@ discard block |
||
464 | 464 | } |
465 | 465 | } |
466 | 466 | if (empty($workLink)) { |
467 | - $this->logger->warning('File not found in fileGrps "' . $this->extConf['files']['fileGrpDownload'] . '"'); |
|
467 | + $this->logger->warning('File not found in fileGrps "'.$this->extConf['files']['fileGrpDownload'].'"'); |
|
468 | 468 | } |
469 | 469 | return $workLink; |
470 | 470 | } |
@@ -66,15 +66,15 @@ discard block |
||
66 | 66 | $_EXTKEY = 'dlf'; |
67 | 67 | // Register tools for toolbox plugin. |
68 | 68 | $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['dlf/Classes/Plugin/Toolbox.php']['tools'] = []; |
69 | -$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['dlf/Classes/Plugin/Toolbox.php']['tools'][\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::getCN($_EXTKEY) . '_scoretool'] = 'LLL:EXT:dlf/Resources/Private/Language/locallang_labels.xlf:tx_dlf_toolbox.scoretool'; |
|
70 | -$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['dlf/Classes/Plugin/Toolbox.php']['tools'][\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::getCN($_EXTKEY) . '_fulltexttool'] = 'LLL:EXT:dlf/Resources/Private/Language/locallang_labels.xlf:tx_dlf_toolbox.fulltexttool'; |
|
71 | -$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['dlf/Classes/Plugin/Toolbox.php']['tools'][\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::getCN($_EXTKEY) . '_annotationtool'] = 'LLL:EXT:dlf/Resources/Private/Language/locallang_labels.xlf:tx_dlf_toolbox.annotationtool'; |
|
72 | -$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['dlf/Classes/Plugin/Toolbox.php']['tools'][\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::getCN($_EXTKEY) . '_fulltextdownloadtool'] = 'LLL:EXT:dlf/Resources/Private/Language/locallang_labels.xlf:tx_dlf_toolbox.fulltextdownloadtool'; |
|
73 | -$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['dlf/Classes/Plugin/Toolbox.php']['tools'][\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::getCN($_EXTKEY) . '_imagedownloadtool'] = 'LLL:EXT:dlf/Resources/Private/Language/locallang_labels.xlf:tx_dlf_toolbox.imagedownloadtool'; |
|
74 | -$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['dlf/Classes/Plugin/Toolbox.php']['tools'][\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::getCN($_EXTKEY) . '_imagemanipulationtool'] = 'LLL:EXT:dlf/Resources/Private/Language/locallang_labels.xlf:tx_dlf_toolbox.imagemanipulationtool'; |
|
75 | -$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['dlf/Classes/Plugin/Toolbox.php']['tools'][\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::getCN($_EXTKEY) . '_modeldownloadtool'] = 'LLL:EXT:dlf/Resources/Private/Language/locallang_labels.xlf:tx_dlf_toolbox.modeldownloadtool'; |
|
76 | -$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['dlf/Classes/Plugin/Toolbox.php']['tools'][\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::getCN($_EXTKEY) . '_pdfdownloadtool'] = 'LLL:EXT:dlf/Resources/Private/Language/locallang_labels.xlf:tx_dlf_toolbox.pdfdownloadtool'; |
|
77 | -$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['dlf/Classes/Plugin/Toolbox.php']['tools'][\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::getCN($_EXTKEY) . '_searchindocumenttool'] = 'LLL:EXT:dlf/Resources/Private/Language/locallang_labels.xlf:tx_dlf_toolbox.searchindocumenttool'; |
|
69 | +$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['dlf/Classes/Plugin/Toolbox.php']['tools'][\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::getCN($_EXTKEY).'_scoretool'] = 'LLL:EXT:dlf/Resources/Private/Language/locallang_labels.xlf:tx_dlf_toolbox.scoretool'; |
|
70 | +$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['dlf/Classes/Plugin/Toolbox.php']['tools'][\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::getCN($_EXTKEY).'_fulltexttool'] = 'LLL:EXT:dlf/Resources/Private/Language/locallang_labels.xlf:tx_dlf_toolbox.fulltexttool'; |
|
71 | +$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['dlf/Classes/Plugin/Toolbox.php']['tools'][\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::getCN($_EXTKEY).'_annotationtool'] = 'LLL:EXT:dlf/Resources/Private/Language/locallang_labels.xlf:tx_dlf_toolbox.annotationtool'; |
|
72 | +$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['dlf/Classes/Plugin/Toolbox.php']['tools'][\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::getCN($_EXTKEY).'_fulltextdownloadtool'] = 'LLL:EXT:dlf/Resources/Private/Language/locallang_labels.xlf:tx_dlf_toolbox.fulltextdownloadtool'; |
|
73 | +$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['dlf/Classes/Plugin/Toolbox.php']['tools'][\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::getCN($_EXTKEY).'_imagedownloadtool'] = 'LLL:EXT:dlf/Resources/Private/Language/locallang_labels.xlf:tx_dlf_toolbox.imagedownloadtool'; |
|
74 | +$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['dlf/Classes/Plugin/Toolbox.php']['tools'][\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::getCN($_EXTKEY).'_imagemanipulationtool'] = 'LLL:EXT:dlf/Resources/Private/Language/locallang_labels.xlf:tx_dlf_toolbox.imagemanipulationtool'; |
|
75 | +$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['dlf/Classes/Plugin/Toolbox.php']['tools'][\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::getCN($_EXTKEY).'_modeldownloadtool'] = 'LLL:EXT:dlf/Resources/Private/Language/locallang_labels.xlf:tx_dlf_toolbox.modeldownloadtool'; |
|
76 | +$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['dlf/Classes/Plugin/Toolbox.php']['tools'][\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::getCN($_EXTKEY).'_pdfdownloadtool'] = 'LLL:EXT:dlf/Resources/Private/Language/locallang_labels.xlf:tx_dlf_toolbox.pdfdownloadtool'; |
|
77 | +$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['dlf/Classes/Plugin/Toolbox.php']['tools'][\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::getCN($_EXTKEY).'_searchindocumenttool'] = 'LLL:EXT:dlf/Resources/Private/Language/locallang_labels.xlf:tx_dlf_toolbox.searchindocumenttool'; |
|
78 | 78 | // Register hooks. |
79 | 79 | $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_tcemain.php']['processDatamapClass'][] = \Kitodo\Dlf\Hooks\DataHandler::class; |
80 | 80 | $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_tcemain.php']['processCmdmapClass'][] = \Kitodo\Dlf\Hooks\DataHandler::class; |
@@ -112,7 +112,7 @@ discard block |
||
112 | 112 | ]; |
113 | 113 | // Register AJAX eID handlers. |
114 | 114 | if ($GLOBALS['TYPO3_CONF_VARS']['EXTENSIONS']['dlf']['general']['enableInternalProxy'] ?? false) { |
115 | - $GLOBALS['TYPO3_CONF_VARS']['FE']['eID_include']['tx_dlf_pageview_proxy'] = \Kitodo\Dlf\Eid\PageViewProxy::class . '::main'; |
|
115 | + $GLOBALS['TYPO3_CONF_VARS']['FE']['eID_include']['tx_dlf_pageview_proxy'] = \Kitodo\Dlf\Eid\PageViewProxy::class.'::main'; |
|
116 | 116 | } |
117 | 117 | // Use Caching Framework for Solr queries |
118 | 118 | $GLOBALS['TYPO3_CONF_VARS']['SYS']['caching']['cacheConfigurations']['tx_dlf_solr'] ??= []; |
@@ -74,12 +74,12 @@ |
||
74 | 74 | $solr = Solr::getInstance($input->getOption('solr')); |
75 | 75 | // Connect to Solr server. |
76 | 76 | if (!$solr->ready) { |
77 | - $io->error('ERROR: Connection to Solr core ("' . $input->getOption('solr') . '") not possible \n'); |
|
77 | + $io->error('ERROR: Connection to Solr core ("'.$input->getOption('solr').'") not possible \n'); |
|
78 | 78 | return BaseCommand::FAILURE; |
79 | 79 | } |
80 | 80 | |
81 | 81 | if (!$solr->suggestBuild()) { |
82 | - $io->error('ERROR: Sending the command suggest.build=true to Solr core ("' . $input->getOption('solr') . '") not possible \n'); |
|
82 | + $io->error('ERROR: Sending the command suggest.build=true to Solr core ("'.$input->getOption('solr').'") not possible \n'); |
|
83 | 83 | return BaseCommand::FAILURE; |
84 | 84 | } |
85 | 85 |
@@ -104,7 +104,7 @@ discard block |
||
104 | 104 | $this->initializeRepositories((int) $input->getOption('pid')); |
105 | 105 | |
106 | 106 | if ($this->storagePid == 0) { |
107 | - $io->error('ERROR: No valid PID (' . $this->storagePid . ') given.'); |
|
107 | + $io->error('ERROR: No valid PID ('.$this->storagePid.') given.'); |
|
108 | 108 | return BaseCommand::FAILURE; |
109 | 109 | } |
110 | 110 | |
@@ -119,13 +119,13 @@ discard block |
||
119 | 119 | if (empty($solrCoreUid) || !in_array($solrCoreUid, $allSolrCores)) { |
120 | 120 | $outputSolrCores = []; |
121 | 121 | foreach ($allSolrCores as $indexName => $uid) { |
122 | - $outputSolrCores[] = $uid . ' : ' . $indexName; |
|
122 | + $outputSolrCores[] = $uid.' : '.$indexName; |
|
123 | 123 | } |
124 | 124 | if (empty($outputSolrCores)) { |
125 | - $io->error('ERROR: No valid Solr core ("' . $input->getOption('solr') . '") given. No valid cores found on PID ' . $this->storagePid . ".\n"); |
|
125 | + $io->error('ERROR: No valid Solr core ("'.$input->getOption('solr').'") given. No valid cores found on PID '.$this->storagePid.".\n"); |
|
126 | 126 | return BaseCommand::FAILURE; |
127 | 127 | } else { |
128 | - $io->error('ERROR: No valid Solr core ("' . $input->getOption('solr') . '") given. ' . "Valid cores are (<uid>:<index_name>):\n" . implode("\n", $outputSolrCores) . "\n"); |
|
128 | + $io->error('ERROR: No valid Solr core ("'.$input->getOption('solr').'") given. '."Valid cores are (<uid>:<index_name>):\n".implode("\n", $outputSolrCores)."\n"); |
|
129 | 129 | return BaseCommand::FAILURE; |
130 | 130 | } |
131 | 131 | } |
@@ -165,7 +165,7 @@ discard block |
||
165 | 165 | $document = $this->documentRepository->findByUid($input->getOption('doc')); |
166 | 166 | |
167 | 167 | if ($document === null) { |
168 | - $io->error('ERROR: Document with UID "' . $input->getOption('doc') . '" could not be found on PID ' . $this->storagePid . ' .'); |
|
168 | + $io->error('ERROR: Document with UID "'.$input->getOption('doc').'" could not be found on PID '.$this->storagePid.' .'); |
|
169 | 169 | return BaseCommand::FAILURE; |
170 | 170 | } else { |
171 | 171 | $doc = AbstractDocument::getInstance($document->getLocation(), ['storagePid' => $this->storagePid], true); |
@@ -178,31 +178,31 @@ discard block |
||
178 | 178 | } |
179 | 179 | |
180 | 180 | if ($doc === null) { |
181 | - $io->error('ERROR: Document "' . $input->getOption('doc') . '" could not be loaded.'); |
|
181 | + $io->error('ERROR: Document "'.$input->getOption('doc').'" could not be loaded.'); |
|
182 | 182 | return BaseCommand::FAILURE; |
183 | 183 | } |
184 | 184 | |
185 | 185 | $document->setSolrcore($solrCoreUid); |
186 | 186 | |
187 | 187 | if ($dryRun) { |
188 | - $io->section('DRY RUN: Would index ' . $document->getUid() . ' ("' . $document->getLocation() . '") on PID ' . $this->storagePid . ' and Solr core ' . $solrCoreUid . '.'); |
|
188 | + $io->section('DRY RUN: Would index '.$document->getUid().' ("'.$document->getLocation().'") on PID '.$this->storagePid.' and Solr core '.$solrCoreUid.'.'); |
|
189 | 189 | $io->success('All done!'); |
190 | 190 | return BaseCommand::SUCCESS; |
191 | 191 | } else { |
192 | 192 | $document->setCurrentDocument($doc); |
193 | 193 | |
194 | 194 | if ($io->isVerbose()) { |
195 | - $io->section('Indexing ' . $document->getUid() . ' ("' . $document->getLocation() . '") on PID ' . $this->storagePid . '.'); |
|
195 | + $io->section('Indexing '.$document->getUid().' ("'.$document->getLocation().'") on PID '.$this->storagePid.'.'); |
|
196 | 196 | } |
197 | 197 | $isSaved = $this->saveToDatabase($document, $input->getOption('softCommit')); |
198 | 198 | |
199 | 199 | if ($isSaved) { |
200 | 200 | if ($io->isVerbose()) { |
201 | - $io->section('Indexing ' . $document->getUid() . ' ("' . $document->getLocation() . '") on Solr core ' . $solrCoreUid . '.'); |
|
201 | + $io->section('Indexing '.$document->getUid().' ("'.$document->getLocation().'") on Solr core '.$solrCoreUid.'.'); |
|
202 | 202 | } |
203 | 203 | $isSaved = Indexer::add($document, $this->documentRepository, $input->getOption('softCommit')); |
204 | 204 | } else { |
205 | - $io->error('ERROR: Document with UID "' . $document->getUid() . '" could not be indexed on PID ' . $this->storagePid . ' . There are missing mandatory fields (at least one of those: ' . $this->extConf['general']['requiredMetadataFields'] . ') in this document.'); |
|
205 | + $io->error('ERROR: Document with UID "'.$document->getUid().'" could not be indexed on PID '.$this->storagePid.' . There are missing mandatory fields (at least one of those: '.$this->extConf['general']['requiredMetadataFields'].') in this document.'); |
|
206 | 206 | return BaseCommand::FAILURE; |
207 | 207 | } |
208 | 208 | |
@@ -211,8 +211,8 @@ discard block |
||
211 | 211 | return BaseCommand::SUCCESS; |
212 | 212 | } |
213 | 213 | |
214 | - $io->error('ERROR: Document with UID "' . $document->getUid() . '" could not be indexed on Solr core ' . $solrCoreUid . ' . There are missing mandatory fields (at least one of those: ' . $this->extConf['general']['requiredMetadataFields'] . ') in this document.'); |
|
215 | - $io->info('INFO: Document with UID "' . $document->getUid() . '" is already in database. If you want to keep the database and index consistent you need to remove it.'); |
|
214 | + $io->error('ERROR: Document with UID "'.$document->getUid().'" could not be indexed on Solr core '.$solrCoreUid.' . There are missing mandatory fields (at least one of those: '.$this->extConf['general']['requiredMetadataFields'].') in this document.'); |
|
215 | + $io->info('INFO: Document with UID "'.$document->getUid().'" is already in database. If you want to keep the database and index consistent you need to remove it.'); |
|
216 | 216 | return BaseCommand::FAILURE; |
217 | 217 | } |
218 | 218 | } |