We could not synchronize checks via GitHub's checks API since Scrutinizer's GitHub App is not installed for this repository.
@@ -537,14 +537,16 @@ |
||
| 537 | 537 | // Yes. Get the file reference. |
| 538 | 538 | $details['points'] = (string) $structure->children('http://www.loc.gov/METS/')->mptr[0]->attributes('http://www.w3.org/1999/xlink')->href; |
| 539 | 539 | } elseif (!empty($this->physicalStructure) |
| 540 | - && array_key_exists($details['id'], $this->smLinks['l2p'])) { // Are there any physical elements and is this logical unit linked to at least one of them? |
|
| 540 | + && array_key_exists($details['id'], $this->smLinks['l2p'])) { |
|
| 541 | +// Are there any physical elements and is this logical unit linked to at least one of them? |
|
| 541 | 542 | $details['points'] = max(intval(array_search($this->smLinks['l2p'][$details['id']][0], $this->physicalStructure, TRUE)), 1); |
| 542 | 543 | if (!empty($this->physicalStructureInfo[$this->smLinks['l2p'][$details['id']][0]]['files'][$extConf['fileGrpThumbs']])) { |
| 543 | 544 | $details['thumbnailId'] = $this->physicalStructureInfo[$this->smLinks['l2p'][$details['id']][0]]['files'][$extConf['fileGrpThumbs']]; |
| 544 | 545 | } |
| 545 | 546 | // Get page/track number of the first page/track related to this structure element. |
| 546 | 547 | $details['pagination'] = $this->physicalStructureInfo[$this->smLinks['l2p'][$details['id']][0]]['orderlabel']; |
| 547 | - } elseif ($details['id'] == $this->_getToplevelId()) { // Is this the toplevel structure element? |
|
| 548 | + } elseif ($details['id'] == $this->_getToplevelId()) { |
|
| 549 | +// Is this the toplevel structure element? |
|
| 548 | 550 | // Yes. Point to itself. |
| 549 | 551 | $details['points'] = 1; |
| 550 | 552 | if (!empty($this->physicalStructure) |
@@ -447,7 +447,7 @@ discard block |
||
| 447 | 447 | if ((!empty($this->piVars['order']) && $this->piVars['order'] != $listMetadata['options']['order']) |
| 448 | 448 | || (isset($this->piVars['asc']) && $this->piVars['asc'] != $listMetadata['options']['order.asc'])) { |
| 449 | 449 | // Update list's metadata. |
| 450 | - $listMetadata['options']['params']['sort'] = [$this->piVars['order']."_sorting" => (boolean) $this->piVars['asc']?'asc':'desc']; |
|
| 450 | + $listMetadata['options']['params']['sort'] = [$this->piVars['order']."_sorting" => (boolean) $this->piVars['asc'] ? 'asc' : 'desc']; |
|
| 451 | 451 | $listMetadata['options']['order'] = $this->piVars['order']; |
| 452 | 452 | $listMetadata['options']['order.asc'] = (boolean) $this->piVars['asc']; |
| 453 | 453 | // Reset pointer. |
@@ -465,7 +465,7 @@ discard block |
||
| 465 | 465 | return $content; |
| 466 | 466 | } |
| 467 | 467 | // Set search parameters. |
| 468 | - $solr->cPid = $listMetadata['options']['pid']; |
|
| 468 | + $solr->cPid = $listMetadata['options']['pid']; |
|
| 469 | 469 | $solr->params = $listMetadata['options']['params']; |
| 470 | 470 | // Perform search. |
| 471 | 471 | $this->list = $solr->search(); |
@@ -505,7 +505,7 @@ discard block |
||
| 505 | 505 | $markerArray['###LISTTHUMBNAIL###'] = ''; |
| 506 | 506 | } |
| 507 | 507 | if ($currentEntry) { |
| 508 | - $currentEntry = ($this->piVars['pointer'] * $this->conf['limit']) + 1; |
|
| 508 | + $currentEntry = ($this->piVars['pointer'] * $this->conf['limit']) + 1; |
|
| 509 | 509 | $lastEntry = ($this->piVars['pointer'] * $this->conf['limit']) + $this->conf['limit']; |
| 510 | 510 | $markerArray['###COUNT###'] = htmlspecialchars(sprintf($this->pi_getLL('count'), $currentEntry, $lastEntry < $this->list->metadata['options']['numberOfToplevelHits'] ? $lastEntry : $this->list->metadata['options']['numberOfToplevelHits'], $this->list->metadata['options']['numberOfToplevelHits'])); |
| 511 | 511 | } else { |
@@ -161,11 +161,14 @@ discard block |
||
| 161 | 161 | 'additionalParams' => \TYPO3\CMS\Core\Utility\GeneralUtility::implodeArrayForUrl($this->prefixId, $additionalParams, '', TRUE, FALSE) |
| 162 | 162 | ]; |
| 163 | 163 | $value = $this->cObj->typoLink(htmlspecialchars($value), $conf); |
| 164 | - } elseif ($index_name == 'owner' && !empty($value)) { // Translate name of holding library. |
|
| 164 | + } elseif ($index_name == 'owner' && !empty($value)) { |
|
| 165 | +// Translate name of holding library. |
|
| 165 | 166 | $value = htmlspecialchars(Helper::translate($value, 'tx_dlf_libraries', $this->conf['pages'])); |
| 166 | - } elseif ($index_name == 'type' && !empty($value)) { // Translate document type. |
|
| 167 | + } elseif ($index_name == 'type' && !empty($value)) { |
|
| 168 | +// Translate document type. |
|
| 167 | 169 | $value = htmlspecialchars(Helper::translate($value, 'tx_dlf_structures', $this->conf['pages'])); |
| 168 | - } elseif ($index_name == 'language' && !empty($value)) { // Translate ISO 639 language code. |
|
| 170 | + } elseif ($index_name == 'language' && !empty($value)) { |
|
| 171 | +// Translate ISO 639 language code. |
|
| 169 | 172 | $value = htmlspecialchars(Helper::getLanguageName($value)); |
| 170 | 173 | } elseif (!empty($value)) { |
| 171 | 174 | $value = htmlspecialchars($value); |
@@ -328,16 +331,19 @@ discard block |
||
| 328 | 331 | 'additionalParams' => \TYPO3\CMS\Core\Utility\GeneralUtility::implodeArrayForUrl($this->prefixId, $additionalParams, '', TRUE, FALSE) |
| 329 | 332 | ]; |
| 330 | 333 | $value = $this->cObj->typoLink(htmlspecialchars($value), $conf); |
| 331 | - } elseif ($index_name == 'owner' && !empty($value)) { // Translate name of holding library. |
|
| 334 | + } elseif ($index_name == 'owner' && !empty($value)) { |
|
| 335 | +// Translate name of holding library. |
|
| 332 | 336 | $value = htmlspecialchars(Helper::translate($value, 'tx_dlf_libraries', $this->conf['pages'])); |
| 333 | - } elseif ($index_name == 'type' && !empty($value)) { // Translate document type. |
|
| 337 | + } elseif ($index_name == 'type' && !empty($value)) { |
|
| 338 | +// Translate document type. |
|
| 334 | 339 | $_value = $value; |
| 335 | 340 | $value = htmlspecialchars(Helper::translate($value, 'tx_dlf_structures', $this->conf['pages'])); |
| 336 | 341 | // Add page number for single pages. |
| 337 | 342 | if ($_value == 'page') { |
| 338 | 343 | $value .= ' '.intval($subpart['page']); |
| 339 | 344 | } |
| 340 | - } elseif ($index_name == 'language' && !empty($value)) { // Translate ISO 639 language code. |
|
| 345 | + } elseif ($index_name == 'language' && !empty($value)) { |
|
| 346 | +// Translate ISO 639 language code. |
|
| 341 | 347 | $value = htmlspecialchars(Helper::getLanguageName($value)); |
| 342 | 348 | } elseif (!empty($value)) { |
| 343 | 349 | $value = htmlspecialchars($value); |
@@ -14,19 +14,19 @@ discard block |
||
| 14 | 14 | } |
| 15 | 15 | // Define constants. |
| 16 | 16 | if (!defined('DEVLOG_SEVERITY_OK')) { |
| 17 | - define ('DEVLOG_SEVERITY_OK', -1); |
|
| 17 | + define('DEVLOG_SEVERITY_OK', -1); |
|
| 18 | 18 | } |
| 19 | 19 | if (!defined('DEVLOG_SEVERITY_INFO')) { |
| 20 | - define ('DEVLOG_SEVERITY_INFO', 0); |
|
| 20 | + define('DEVLOG_SEVERITY_INFO', 0); |
|
| 21 | 21 | } |
| 22 | 22 | if (!defined('DEVLOG_SEVERITY_NOTICE')) { |
| 23 | - define ('DEVLOG_SEVERITY_NOTICE', 1); |
|
| 23 | + define('DEVLOG_SEVERITY_NOTICE', 1); |
|
| 24 | 24 | } |
| 25 | 25 | if (!defined('DEVLOG_SEVERITY_WARNING')) { |
| 26 | - define ('DEVLOG_SEVERITY_WARNING', 2); |
|
| 26 | + define('DEVLOG_SEVERITY_WARNING', 2); |
|
| 27 | 27 | } |
| 28 | 28 | if (!defined('DEVLOG_SEVERITY_ERROR')) { |
| 29 | - define ('DEVLOG_SEVERITY_ERROR', 3); |
|
| 29 | + define('DEVLOG_SEVERITY_ERROR', 3); |
|
| 30 | 30 | } |
| 31 | 31 | // Register plugins. |
| 32 | 32 | \Kitodo\Dlf\Hooks\ExtensionManagementUtility::addPItoST43($_EXTKEY, \Kitodo\Dlf\Plugin\AudioPlayer::class, '_audioplayer', 'list_type', TRUE); |
@@ -61,7 +61,7 @@ discard block |
||
| 61 | 61 | $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['dlf/Classes/Common/Document.php']['hookClass'][] = \Kitodo\Dlf\Hooks\KitodoProductionHacks::class; |
| 62 | 62 | // Register command line scripts. |
| 63 | 63 | $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['GLOBAL']['cliKeys'][$_EXTKEY] = [ |
| 64 | - function () { |
|
| 64 | + function() { |
|
| 65 | 65 | $SOBE = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(\Kitodo\Dlf\Cli\CommandLineIndexer::class); |
| 66 | 66 | $SOBE->main(); |
| 67 | 67 | }, |
@@ -580,18 +580,18 @@ |
||
| 580 | 580 | return $original; |
| 581 | 581 | } |
| 582 | 582 | |
| 583 | - /** |
|
| 584 | - * Process a data and/or command map with TYPO3 core engine as admin. |
|
| 585 | - * |
|
| 586 | - * @access public |
|
| 587 | - * |
|
| 588 | - * @param array $data: Data map |
|
| 589 | - * @param array $cmd: Command map |
|
| 590 | - * @param boolean $reverseOrder: Should the data map be reversed? |
|
| 591 | - * @param boolean $cmdFirst: Should the command map be processed first? |
|
| 592 | - * |
|
| 593 | - * @return array Array of substituted "NEW..." identifiers and their actual UIDs. |
|
| 594 | - */ |
|
| 583 | + /** |
|
| 584 | + * Process a data and/or command map with TYPO3 core engine as admin. |
|
| 585 | + * |
|
| 586 | + * @access public |
|
| 587 | + * |
|
| 588 | + * @param array $data: Data map |
|
| 589 | + * @param array $cmd: Command map |
|
| 590 | + * @param boolean $reverseOrder: Should the data map be reversed? |
|
| 591 | + * @param boolean $cmdFirst: Should the command map be processed first? |
|
| 592 | + * |
|
| 593 | + * @return array Array of substituted "NEW..." identifiers and their actual UIDs. |
|
| 594 | + */ |
|
| 595 | 595 | public static function processDBasAdmin(array $data = [], array $cmd = [], $reverseOrder = FALSE, $cmdFirst = FALSE) { |
| 596 | 596 | if (TYPO3_MODE === 'BE' |
| 597 | 597 | && $GLOBALS['BE_USER']->isAdmin()) { |