We could not synchronize checks via GitHub's checks API since Scrutinizer's GitHub App is not installed for this repository.
@@ -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 | \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPItoST43($_EXTKEY, 'Classes/Plugins/AudioPlayer.php', '_audioplayer', 'list_type', TRUE); |
@@ -60,7 +60,7 @@ discard block |
||
| 60 | 60 | $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['dlf/Classes/Common/Document.php']['hookClass'][] = 'EXT:'.$_EXTKEY.'/Classes/Hooks/KitodoProductionHacks.php:KitodoProductionHacks'; |
| 61 | 61 | // Register command line scripts. |
| 62 | 62 | $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['GLOBAL']['cliKeys'][$_EXTKEY] = [ |
| 63 | - function () { |
|
| 63 | + function() { |
|
| 64 | 64 | $SOBE = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(\Kitodo\Dlf\Cli\CommandLineIndexer::class); |
| 65 | 65 | $SOBE->main(); |
| 66 | 66 | }, |
@@ -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 { |
@@ -160,11 +160,14 @@ discard block |
||
| 160 | 160 | 'additionalParams' => \TYPO3\CMS\Core\Utility\GeneralUtility::implodeArrayForUrl($this->prefixId, $additionalParams, '', TRUE, FALSE) |
| 161 | 161 | ]; |
| 162 | 162 | $value = $this->cObj->typoLink(htmlspecialchars($value), $conf); |
| 163 | - } elseif ($index_name == 'owner' && !empty($value)) { // Translate name of holding library. |
|
| 163 | + } elseif ($index_name == 'owner' && !empty($value)) { |
|
| 164 | +// Translate name of holding library. |
|
| 164 | 165 | $value = htmlspecialchars(Helper::translate($value, 'tx_dlf_libraries', $this->conf['pages'])); |
| 165 | - } elseif ($index_name == 'type' && !empty($value)) { // Translate document type. |
|
| 166 | + } elseif ($index_name == 'type' && !empty($value)) { |
|
| 167 | +// Translate document type. |
|
| 166 | 168 | $value = htmlspecialchars(Helper::translate($value, 'tx_dlf_structures', $this->conf['pages'])); |
| 167 | - } elseif ($index_name == 'language' && !empty($value)) { // Translate ISO 639 language code. |
|
| 169 | + } elseif ($index_name == 'language' && !empty($value)) { |
|
| 170 | +// Translate ISO 639 language code. |
|
| 168 | 171 | $value = htmlspecialchars(Helper::getLanguageName($value)); |
| 169 | 172 | } elseif (!empty($value)) { |
| 170 | 173 | $value = htmlspecialchars($value); |
@@ -325,16 +328,19 @@ discard block |
||
| 325 | 328 | 'additionalParams' => \TYPO3\CMS\Core\Utility\GeneralUtility::implodeArrayForUrl($this->prefixId, $additionalParams, '', TRUE, FALSE) |
| 326 | 329 | ]; |
| 327 | 330 | $value = $this->cObj->typoLink(htmlspecialchars($value), $conf); |
| 328 | - } elseif ($index_name == 'owner' && !empty($value)) { // Translate name of holding library. |
|
| 331 | + } elseif ($index_name == 'owner' && !empty($value)) { |
|
| 332 | +// Translate name of holding library. |
|
| 329 | 333 | $value = htmlspecialchars(Helper::translate($value, 'tx_dlf_libraries', $this->conf['pages'])); |
| 330 | - } elseif ($index_name == 'type' && !empty($value)) { // Translate document type. |
|
| 334 | + } elseif ($index_name == 'type' && !empty($value)) { |
|
| 335 | +// Translate document type. |
|
| 331 | 336 | $_value = $value; |
| 332 | 337 | $value = htmlspecialchars(Helper::translate($value, 'tx_dlf_structures', $this->conf['pages'])); |
| 333 | 338 | // Add page number for single pages. |
| 334 | 339 | if ($_value == 'page') { |
| 335 | 340 | $value .= ' '.intval($subpart['page']); |
| 336 | 341 | } |
| 337 | - } elseif ($index_name == 'language' && !empty($value)) { // Translate ISO 639 language code. |
|
| 342 | + } elseif ($index_name == 'language' && !empty($value)) { |
|
| 343 | +// Translate ISO 639 language code. |
|
| 338 | 344 | $value = htmlspecialchars(Helper::getLanguageName($value)); |
| 339 | 345 | } elseif (!empty($value)) { |
| 340 | 346 | $value = htmlspecialchars($value); |
@@ -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) |