@@ -103,7 +103,7 @@ discard block |
||
| 103 | 103 | * @var bool |
| 104 | 104 | * @access protected |
| 105 | 105 | */ |
| 106 | - protected $formatsLoaded = false; |
|
| 106 | + protected $formatsLoaded = FALSE; |
|
| 107 | 107 | |
| 108 | 108 | /** |
| 109 | 109 | * Are there any fulltext files available? This also includes IIIF text annotations |
@@ -113,7 +113,7 @@ discard block |
||
| 113 | 113 | * @var bool |
| 114 | 114 | * @access protected |
| 115 | 115 | */ |
| 116 | - protected $hasFulltext = false; |
|
| 116 | + protected $hasFulltext = FALSE; |
|
| 117 | 117 | |
| 118 | 118 | /** |
| 119 | 119 | * Last searched logical and physical page |
@@ -121,7 +121,7 @@ discard block |
||
| 121 | 121 | * @var array |
| 122 | 122 | * @access protected |
| 123 | 123 | */ |
| 124 | - protected $lastSearchedPhysicalPage = ['logicalPage' => null, 'physicalPage' => null]; |
|
| 124 | + protected $lastSearchedPhysicalPage = ['logicalPage' => NULL, 'physicalPage' => NULL]; |
|
| 125 | 125 | |
| 126 | 126 | /** |
| 127 | 127 | * This holds the documents location |
@@ -155,7 +155,7 @@ discard block |
||
| 155 | 155 | * @var bool |
| 156 | 156 | * @access protected |
| 157 | 157 | */ |
| 158 | - protected $metadataArrayLoaded = false; |
|
| 158 | + protected $metadataArrayLoaded = FALSE; |
|
| 159 | 159 | |
| 160 | 160 | /** |
| 161 | 161 | * The holds the total number of pages |
@@ -196,7 +196,7 @@ discard block |
||
| 196 | 196 | * @var bool |
| 197 | 197 | * @access protected |
| 198 | 198 | */ |
| 199 | - protected $physicalStructureLoaded = false; |
|
| 199 | + protected $physicalStructureLoaded = FALSE; |
|
| 200 | 200 | |
| 201 | 201 | /** |
| 202 | 202 | * This holds the PID of the document or zero if not in database |
@@ -221,7 +221,7 @@ discard block |
||
| 221 | 221 | * @var bool |
| 222 | 222 | * @access protected |
| 223 | 223 | */ |
| 224 | - protected $ready = false; |
|
| 224 | + protected $ready = FALSE; |
|
| 225 | 225 | |
| 226 | 226 | /** |
| 227 | 227 | * The METS file's / IIIF manifest's record identifier |
@@ -255,7 +255,7 @@ discard block |
||
| 255 | 255 | * @var bool |
| 256 | 256 | * @access protected |
| 257 | 257 | */ |
| 258 | - protected $rootIdLoaded = false; |
|
| 258 | + protected $rootIdLoaded = FALSE; |
|
| 259 | 259 | |
| 260 | 260 | /** |
| 261 | 261 | * This holds the smLinks between logical and physical structMap |
@@ -272,7 +272,7 @@ discard block |
||
| 272 | 272 | * @var bool |
| 273 | 273 | * @access protected |
| 274 | 274 | */ |
| 275 | - protected $smLinksLoaded = false; |
|
| 275 | + protected $smLinksLoaded = FALSE; |
|
| 276 | 276 | |
| 277 | 277 | /** |
| 278 | 278 | * This holds the logical structure |
@@ -289,7 +289,7 @@ discard block |
||
| 289 | 289 | * @var bool |
| 290 | 290 | * @access protected |
| 291 | 291 | */ |
| 292 | - protected $tableOfContentsLoaded = false; |
|
| 292 | + protected $tableOfContentsLoaded = FALSE; |
|
| 293 | 293 | |
| 294 | 294 | /** |
| 295 | 295 | * This holds the document's thumbnail location |
@@ -306,7 +306,7 @@ discard block |
||
| 306 | 306 | * @var bool |
| 307 | 307 | * @access protected |
| 308 | 308 | */ |
| 309 | - protected $thumbnailLoaded = false; |
|
| 309 | + protected $thumbnailLoaded = FALSE; |
|
| 310 | 310 | |
| 311 | 311 | /** |
| 312 | 312 | * This holds the toplevel structure's @ID (METS) or the manifest's @id (IIIF) |
@@ -423,7 +423,7 @@ discard block |
||
| 423 | 423 | * |
| 424 | 424 | * @return \Kitodo\Dlf\Common\Document Instance of this class, either MetsDocument or IiifManifest |
| 425 | 425 | */ |
| 426 | - public static function &getInstance($uid, $pid = 0, $forceReload = false) |
|
| 426 | + public static function &getInstance($uid, $pid = 0, $forceReload = FALSE) |
|
| 427 | 427 | { |
| 428 | 428 | // Sanitize input. |
| 429 | 429 | $pid = max(intval($pid), 0); |
@@ -463,10 +463,10 @@ discard block |
||
| 463 | 463 | } |
| 464 | 464 | } |
| 465 | 465 | // Create new instance depending on format (METS or IIIF) ... |
| 466 | - $instance = null; |
|
| 467 | - $documentFormat = null; |
|
| 468 | - $xml = null; |
|
| 469 | - $iiif = null; |
|
| 466 | + $instance = NULL; |
|
| 467 | + $documentFormat = NULL; |
|
| 468 | + $xml = NULL; |
|
| 469 | + $iiif = NULL; |
|
| 470 | 470 | // Try to get document format from database |
| 471 | 471 | if (MathUtility::canBeInterpretedAsInteger($uid)) { |
| 472 | 472 | $queryBuilder = GeneralUtility::makeInstance(ConnectionPool::class) |
@@ -515,17 +515,17 @@ discard block |
||
| 515 | 515 | @ini_set('user_agent', $extConf['useragent']); |
| 516 | 516 | } |
| 517 | 517 | $content = GeneralUtility::getUrl($location); |
| 518 | - if ($content !== false) { |
|
| 518 | + if ($content !== FALSE) { |
|
| 519 | 519 | $xml = Helper::getXmlFileAsString($content); |
| 520 | - if ($xml !== false) { |
|
| 520 | + if ($xml !== FALSE) { |
|
| 521 | 521 | /* @var $xml \SimpleXMLElement */ |
| 522 | 522 | $xml->registerXPathNamespace('mets', 'http://www.loc.gov/METS/'); |
| 523 | 523 | $xpathResult = $xml->xpath('//mets:mets'); |
| 524 | - $documentFormat = !empty($xpathResult) ? 'METS' : null; |
|
| 524 | + $documentFormat = !empty($xpathResult) ? 'METS' : NULL; |
|
| 525 | 525 | } else { |
| 526 | 526 | // Try to load file as IIIF resource instead. |
| 527 | - $contentAsJsonArray = json_decode($content, true); |
|
| 528 | - if ($contentAsJsonArray !== null) { |
|
| 527 | + $contentAsJsonArray = json_decode($content, TRUE); |
|
| 528 | + if ($contentAsJsonArray !== NULL) { |
|
| 529 | 529 | // Load plugin configuration. |
| 530 | 530 | $conf = GeneralUtility::makeInstance(ExtensionConfiguration::class)->get(self::$extKey); |
| 531 | 531 | IiifHelper::setUrlReader(IiifUrlReader::getInstance()); |
@@ -580,7 +580,7 @@ discard block |
||
| 580 | 580 | * |
| 581 | 581 | * @return array Array of the element's id, label, type and physical page indexes/mptr link |
| 582 | 582 | */ |
| 583 | - public abstract function getLogicalStructure($id, $recursive = false); |
|
| 583 | + public abstract function getLogicalStructure($id, $recursive = FALSE); |
|
| 584 | 584 | |
| 585 | 585 | /** |
| 586 | 586 | * This extracts all the metadata for a logical structure node |
@@ -617,7 +617,7 @@ discard block |
||
| 617 | 617 | } else { |
| 618 | 618 | $physicalPage = 0; |
| 619 | 619 | foreach ($this->physicalStructureInfo as $page) { |
| 620 | - if (strpos($page['orderlabel'], $logicalPage) !== false) { |
|
| 620 | + if (strpos($page['orderlabel'], $logicalPage) !== FALSE) { |
|
| 621 | 621 | $this->lastSearchedPhysicalPage['logicalPage'] = $logicalPage; |
| 622 | 622 | $this->lastSearchedPhysicalPage['physicalPage'] = $physicalPage; |
| 623 | 623 | return $physicalPage; |
@@ -668,7 +668,7 @@ discard block |
||
| 668 | 668 | if (!empty($this->physicalStructureInfo[$id]['files'][$fileGrpFulltext])) { |
| 669 | 669 | // Get full text file. |
| 670 | 670 | $fileContent = GeneralUtility::getUrl($this->getFileLocation($this->physicalStructureInfo[$id]['files'][$fileGrpFulltext])); |
| 671 | - if ($fileContent !== false) { |
|
| 671 | + if ($fileContent !== FALSE) { |
|
| 672 | 672 | $textFormat = $this->getTextFormat($fileContent); |
| 673 | 673 | } else { |
| 674 | 674 | $this->logger->warning('Couldn\'t load full text file for structure node @ID "' . $id . '"'); |
@@ -734,7 +734,7 @@ discard block |
||
| 734 | 734 | * |
| 735 | 735 | * @return string The title of the document itself or a parent document |
| 736 | 736 | */ |
| 737 | - public static function getTitle($uid, $recursive = false) |
|
| 737 | + public static function getTitle($uid, $recursive = FALSE) |
|
| 738 | 738 | { |
| 739 | 739 | $logger = GeneralUtility::makeInstance(LogManager::class)->getLogger(__CLASS__); |
| 740 | 740 | |
@@ -769,7 +769,7 @@ discard block |
||
| 769 | 769 | && intval($partof) |
| 770 | 770 | && $partof != $uid |
| 771 | 771 | ) { |
| 772 | - $title = self::getTitle($partof, true); |
|
| 772 | + $title = self::getTitle($partof, TRUE); |
|
| 773 | 773 | } |
| 774 | 774 | } else { |
| 775 | 775 | $logger->warning('No document with UID ' . $uid . ' found or document not accessible'); |
@@ -830,12 +830,12 @@ discard block |
||
| 830 | 830 | return $depth; |
| 831 | 831 | } elseif (array_key_exists('children', $element)) { |
| 832 | 832 | $foundInChildren = $this->getTreeDepth($element['children'], $depth + 1, $logId); |
| 833 | - if ($foundInChildren !== false) { |
|
| 833 | + if ($foundInChildren !== FALSE) { |
|
| 834 | 834 | return $foundInChildren; |
| 835 | 835 | } |
| 836 | 836 | } |
| 837 | 837 | } |
| 838 | - return false; |
|
| 838 | + return FALSE; |
|
| 839 | 839 | } |
| 840 | 840 | |
| 841 | 841 | /** |
@@ -912,7 +912,7 @@ discard block |
||
| 912 | 912 | } else { |
| 913 | 913 | $this->logger->error('Invalid file location "' . $location . '" for document loading'); |
| 914 | 914 | } |
| 915 | - return false; |
|
| 915 | + return FALSE; |
|
| 916 | 916 | } |
| 917 | 917 | |
| 918 | 918 | /** |
@@ -959,7 +959,7 @@ discard block |
||
| 959 | 959 | 'class' => $resArray['class'] |
| 960 | 960 | ]; |
| 961 | 961 | } |
| 962 | - $this->formatsLoaded = true; |
|
| 962 | + $this->formatsLoaded = TRUE; |
|
| 963 | 963 | } |
| 964 | 964 | } |
| 965 | 965 | |
@@ -1002,11 +1002,11 @@ discard block |
||
| 1002 | 1002 | * |
| 1003 | 1003 | * @return bool true on success or false on failure |
| 1004 | 1004 | */ |
| 1005 | - public function save($pid = 0, $core = 0, $owner = null) |
|
| 1005 | + public function save($pid = 0, $core = 0, $owner = NULL) |
|
| 1006 | 1006 | { |
| 1007 | 1007 | if (\TYPO3_MODE !== 'BE') { |
| 1008 | 1008 | $this->logger->error('Saving a document is only allowed in the backend'); |
| 1009 | - return false; |
|
| 1009 | + return FALSE; |
|
| 1010 | 1010 | } |
| 1011 | 1011 | // Make sure $pid is a non-negative integer. |
| 1012 | 1012 | $pid = max(intval($pid), 0); |
@@ -1021,7 +1021,7 @@ discard block |
||
| 1021 | 1021 | $pid = $this->pid; |
| 1022 | 1022 | } elseif (!$pid) { |
| 1023 | 1023 | $this->logger->error('Invalid PID ' . $pid . ' for document saving'); |
| 1024 | - return false; |
|
| 1024 | + return FALSE; |
|
| 1025 | 1025 | } |
| 1026 | 1026 | // Set PID for metadata definitions. |
| 1027 | 1027 | $this->cPid = $pid; |
@@ -1034,7 +1034,7 @@ discard block |
||
| 1034 | 1034 | // Check for record identifier. |
| 1035 | 1035 | if (empty($metadata['record_id'][0])) { |
| 1036 | 1036 | $this->logger->error('No record identifier found to avoid duplication'); |
| 1037 | - return false; |
|
| 1037 | + return FALSE; |
|
| 1038 | 1038 | } |
| 1039 | 1039 | // Load plugin configuration. |
| 1040 | 1040 | $conf = GeneralUtility::makeInstance(ExtensionConfiguration::class)->get(self::$extKey); |
@@ -1058,7 +1058,7 @@ discard block |
||
| 1058 | 1058 | $structure = $resArray['uid']; |
| 1059 | 1059 | } else { |
| 1060 | 1060 | $this->logger->error('Could not identify document/structure type "' . $queryBuilder->expr()->literal($metadata['type'][0]) . '"'); |
| 1061 | - return false; |
|
| 1061 | + return FALSE; |
|
| 1062 | 1062 | } |
| 1063 | 1063 | $metadata['type'][0] = $structure; |
| 1064 | 1064 | |
@@ -1118,9 +1118,9 @@ discard block |
||
| 1118 | 1118 | if (!(\TYPO3_REQUESTTYPE & \TYPO3_REQUESTTYPE_CLI)) { |
| 1119 | 1119 | Helper::addMessage( |
| 1120 | 1120 | htmlspecialchars(sprintf(Helper::getMessage('flash.newCollection'), $collection, $substUid[$collNewUid])), |
| 1121 | - Helper::getMessage('flash.attention', true), |
|
| 1121 | + Helper::getMessage('flash.attention', TRUE), |
|
| 1122 | 1122 | \TYPO3\CMS\Core\Messaging\FlashMessage::INFO, |
| 1123 | - true |
|
| 1123 | + TRUE |
|
| 1124 | 1124 | ); |
| 1125 | 1125 | } |
| 1126 | 1126 | } |
@@ -1171,9 +1171,9 @@ discard block |
||
| 1171 | 1171 | if (!(\TYPO3_REQUESTTYPE & \TYPO3_REQUESTTYPE_CLI)) { |
| 1172 | 1172 | Helper::addMessage( |
| 1173 | 1173 | htmlspecialchars(sprintf(Helper::getMessage('flash.newLibrary'), $owner, $ownerUid)), |
| 1174 | - Helper::getMessage('flash.attention', true), |
|
| 1174 | + Helper::getMessage('flash.attention', TRUE), |
|
| 1175 | 1175 | \TYPO3\CMS\Core\Messaging\FlashMessage::INFO, |
| 1176 | - true |
|
| 1176 | + TRUE |
|
| 1177 | 1177 | ); |
| 1178 | 1178 | } |
| 1179 | 1179 | } |
@@ -1261,7 +1261,7 @@ discard block |
||
| 1261 | 1261 | 'author' => implode('; ', $metadata['author']), |
| 1262 | 1262 | 'year' => implode('; ', $metadata['year']), |
| 1263 | 1263 | 'place' => implode('; ', $metadata['place']), |
| 1264 | - 'thumbnail' => $this->_getThumbnail(true), |
|
| 1264 | + 'thumbnail' => $this->_getThumbnail(TRUE), |
|
| 1265 | 1265 | 'metadata' => serialize($listed), |
| 1266 | 1266 | 'metadata_sorting' => serialize($sortable), |
| 1267 | 1267 | 'structure' => $metadata['type'][0], |
@@ -1297,9 +1297,9 @@ discard block |
||
| 1297 | 1297 | if (!(\TYPO3_REQUESTTYPE & \TYPO3_REQUESTTYPE_CLI)) { |
| 1298 | 1298 | Helper::addMessage( |
| 1299 | 1299 | htmlspecialchars(sprintf(Helper::getMessage('flash.documentSaved'), $metadata['title'][0], $this->uid)), |
| 1300 | - Helper::getMessage('flash.done', true), |
|
| 1300 | + Helper::getMessage('flash.done', TRUE), |
|
| 1301 | 1301 | \TYPO3\CMS\Core\Messaging\FlashMessage::OK, |
| 1302 | - true |
|
| 1302 | + TRUE |
|
| 1303 | 1303 | ); |
| 1304 | 1304 | } |
| 1305 | 1305 | // Add document to index. |
@@ -1307,7 +1307,7 @@ discard block |
||
| 1307 | 1307 | return Indexer::add($this, $core); |
| 1308 | 1308 | } else { |
| 1309 | 1309 | $this->logger->notice('Invalid UID "' . $core . '" for Solr core'); |
| 1310 | - return false; |
|
| 1310 | + return FALSE; |
|
| 1311 | 1311 | } |
| 1312 | 1312 | } |
| 1313 | 1313 | |
@@ -1393,7 +1393,7 @@ discard block |
||
| 1393 | 1393 | ) { |
| 1394 | 1394 | $this->prepareMetadataArray($cPid); |
| 1395 | 1395 | $this->metadataArray[0] = $cPid; |
| 1396 | - $this->metadataArrayLoaded = true; |
|
| 1396 | + $this->metadataArrayLoaded = TRUE; |
|
| 1397 | 1397 | } |
| 1398 | 1398 | return $this->metadataArray; |
| 1399 | 1399 | } |
@@ -1502,7 +1502,7 @@ discard block |
||
| 1502 | 1502 | $parent = self::getInstance($this->parentId, $this->pid); |
| 1503 | 1503 | $this->rootId = $parent->rootId; |
| 1504 | 1504 | } |
| 1505 | - $this->rootIdLoaded = true; |
|
| 1505 | + $this->rootIdLoaded = TRUE; |
|
| 1506 | 1506 | } |
| 1507 | 1507 | return $this->rootId; |
| 1508 | 1508 | } |
@@ -1531,8 +1531,8 @@ discard block |
||
| 1531 | 1531 | // Is there no logical structure array yet? |
| 1532 | 1532 | if (!$this->tableOfContentsLoaded) { |
| 1533 | 1533 | // Get all logical structures. |
| 1534 | - $this->getLogicalStructure('', true); |
|
| 1535 | - $this->tableOfContentsLoaded = true; |
|
| 1534 | + $this->getLogicalStructure('', TRUE); |
|
| 1535 | + $this->tableOfContentsLoaded = TRUE; |
|
| 1536 | 1536 | } |
| 1537 | 1537 | return $this->tableOfContents; |
| 1538 | 1538 | } |
@@ -1548,7 +1548,7 @@ discard block |
||
| 1548 | 1548 | * |
| 1549 | 1549 | * @return string The document's thumbnail location |
| 1550 | 1550 | */ |
| 1551 | - protected abstract function _getThumbnail($forceReload = false); |
|
| 1551 | + protected abstract function _getThumbnail($forceReload = FALSE); |
|
| 1552 | 1552 | |
| 1553 | 1553 | /** |
| 1554 | 1554 | * This returns the ID of the toplevel logical structure node |
@@ -1629,7 +1629,7 @@ discard block |
||
| 1629 | 1629 | && $this->load($uid))) { |
| 1630 | 1630 | // Initialize core METS object. |
| 1631 | 1631 | $this->init(); |
| 1632 | - if ($this->getDocument() !== null) { |
|
| 1632 | + if ($this->getDocument() !== NULL) { |
|
| 1633 | 1633 | // Cast to string for safety reasons. |
| 1634 | 1634 | $location = (string) $uid; |
| 1635 | 1635 | $this->establishRecordId($pid); |
@@ -1687,30 +1687,30 @@ discard block |
||
| 1687 | 1687 | $this->parentId = $resArray['partof']; |
| 1688 | 1688 | $this->thumbnail = $resArray['thumbnail']; |
| 1689 | 1689 | $this->location = $resArray['location']; |
| 1690 | - $this->thumbnailLoaded = true; |
|
| 1690 | + $this->thumbnailLoaded = TRUE; |
|
| 1691 | 1691 | // Load XML file if necessary... |
| 1692 | 1692 | if ( |
| 1693 | - $this->getDocument() === null |
|
| 1693 | + $this->getDocument() === NULL |
|
| 1694 | 1694 | && $this->load($this->location) |
| 1695 | 1695 | ) { |
| 1696 | 1696 | // ...and set some basic properties. |
| 1697 | 1697 | $this->init(); |
| 1698 | 1698 | } |
| 1699 | 1699 | // Do we have a METS / IIIF object now? |
| 1700 | - if ($this->getDocument() !== null) { |
|
| 1700 | + if ($this->getDocument() !== NULL) { |
|
| 1701 | 1701 | // Set new location if necessary. |
| 1702 | 1702 | if (!empty($location)) { |
| 1703 | 1703 | $this->location = $location; |
| 1704 | 1704 | } |
| 1705 | 1705 | // Document ready! |
| 1706 | - $this->ready = true; |
|
| 1706 | + $this->ready = TRUE; |
|
| 1707 | 1707 | } |
| 1708 | - } elseif ($this->getDocument() !== null) { |
|
| 1708 | + } elseif ($this->getDocument() !== NULL) { |
|
| 1709 | 1709 | // Set location as UID for documents not in database. |
| 1710 | 1710 | $this->uid = $location; |
| 1711 | 1711 | $this->location = $location; |
| 1712 | 1712 | // Document ready! |
| 1713 | - $this->ready = true; |
|
| 1713 | + $this->ready = TRUE; |
|
| 1714 | 1714 | } else { |
| 1715 | 1715 | $this->logger->error('No document with UID ' . $uid . ' found or document not accessible'); |
| 1716 | 1716 | } |
@@ -74,7 +74,7 @@ discard block |
||
| 74 | 74 | * |
| 75 | 75 | * @return \TYPO3\CMS\Core\Messaging\FlashMessageQueue The queue the message was added to |
| 76 | 76 | */ |
| 77 | - public static function addMessage($message, $title, $severity, $session = false, $queue = 'kitodo.default.flashMessages') |
|
| 77 | + public static function addMessage($message, $title, $severity, $session = FALSE, $queue = 'kitodo.default.flashMessages') |
|
| 78 | 78 | { |
| 79 | 79 | $flashMessageService = GeneralUtility::makeInstance(\TYPO3\CMS\Core\Messaging\FlashMessageService::class); |
| 80 | 80 | $flashMessageQueue = $flashMessageService->getMessageQueueByIdentifier($queue); |
@@ -116,9 +116,9 @@ discard block |
||
| 116 | 116 | $checksum = 'X'; |
| 117 | 117 | } |
| 118 | 118 | if (!preg_match('/[0-9]{8}[0-9X]{1}/i', $id)) { |
| 119 | - return false; |
|
| 119 | + return FALSE; |
|
| 120 | 120 | } elseif (strtoupper(substr($id, -1, 1)) != $checksum) { |
| 121 | - return false; |
|
| 121 | + return FALSE; |
|
| 122 | 122 | } |
| 123 | 123 | break; |
| 124 | 124 | case 'ZDB': |
@@ -126,19 +126,19 @@ discard block |
||
| 126 | 126 | $checksum = 'X'; |
| 127 | 127 | } |
| 128 | 128 | if (!preg_match('/[0-9]{8}-[0-9X]{1}/i', $id)) { |
| 129 | - return false; |
|
| 129 | + return FALSE; |
|
| 130 | 130 | } elseif (strtoupper(substr($id, -1, 1)) != $checksum) { |
| 131 | - return false; |
|
| 131 | + return FALSE; |
|
| 132 | 132 | } |
| 133 | 133 | break; |
| 134 | 134 | case 'SWD': |
| 135 | 135 | $checksum = 11 - $checksum; |
| 136 | 136 | if (!preg_match('/[0-9]{8}-[0-9]{1}/i', $id)) { |
| 137 | - return false; |
|
| 137 | + return FALSE; |
|
| 138 | 138 | } elseif ($checksum == 10) { |
| 139 | 139 | return self::checkIdentifier(($digits + 1) . substr($id, -2, 2), 'SWD'); |
| 140 | 140 | } elseif (substr($id, -1, 1) != $checksum) { |
| 141 | - return false; |
|
| 141 | + return FALSE; |
|
| 142 | 142 | } |
| 143 | 143 | break; |
| 144 | 144 | case 'GKD': |
@@ -147,13 +147,13 @@ discard block |
||
| 147 | 147 | $checksum = 'X'; |
| 148 | 148 | } |
| 149 | 149 | if (!preg_match('/[0-9]{8}-[0-9X]{1}/i', $id)) { |
| 150 | - return false; |
|
| 150 | + return FALSE; |
|
| 151 | 151 | } elseif (strtoupper(substr($id, -1, 1)) != $checksum) { |
| 152 | - return false; |
|
| 152 | + return FALSE; |
|
| 153 | 153 | } |
| 154 | 154 | break; |
| 155 | 155 | } |
| 156 | - return true; |
|
| 156 | + return TRUE; |
|
| 157 | 157 | } |
| 158 | 158 | |
| 159 | 159 | /** |
@@ -168,28 +168,28 @@ discard block |
||
| 168 | 168 | public static function decrypt($encrypted) |
| 169 | 169 | { |
| 170 | 170 | if ( |
| 171 | - !in_array(self::$cipherAlgorithm, openssl_get_cipher_methods(true)) |
|
| 172 | - || !in_array(self::$hashAlgorithm, openssl_get_md_methods(true)) |
|
| 171 | + !in_array(self::$cipherAlgorithm, openssl_get_cipher_methods(TRUE)) |
|
| 172 | + || !in_array(self::$hashAlgorithm, openssl_get_md_methods(TRUE)) |
|
| 173 | 173 | ) { |
| 174 | 174 | self::log('OpenSSL library doesn\'t support cipher and/or hash algorithm', LOG_SEVERITY_ERROR); |
| 175 | - return false; |
|
| 175 | + return FALSE; |
|
| 176 | 176 | } |
| 177 | 177 | if (empty($GLOBALS['TYPO3_CONF_VARS']['SYS']['encryptionKey'])) { |
| 178 | 178 | self::log('No encryption key set in TYPO3 configuration', LOG_SEVERITY_ERROR); |
| 179 | - return false; |
|
| 179 | + return FALSE; |
|
| 180 | 180 | } |
| 181 | 181 | if ( |
| 182 | 182 | empty($encrypted) |
| 183 | 183 | || strlen($encrypted) < openssl_cipher_iv_length(self::$cipherAlgorithm) |
| 184 | 184 | ) { |
| 185 | 185 | self::log('Invalid parameters given for decryption', LOG_SEVERITY_ERROR); |
| 186 | - return false; |
|
| 186 | + return FALSE; |
|
| 187 | 187 | } |
| 188 | 188 | // Split initialisation vector and encrypted data. |
| 189 | 189 | $binary = base64_decode($encrypted); |
| 190 | 190 | $iv = substr($binary, 0, openssl_cipher_iv_length(self::$cipherAlgorithm)); |
| 191 | 191 | $data = substr($binary, openssl_cipher_iv_length(self::$cipherAlgorithm)); |
| 192 | - $key = openssl_digest($GLOBALS['TYPO3_CONF_VARS']['SYS']['encryptionKey'], self::$hashAlgorithm, true); |
|
| 192 | + $key = openssl_digest($GLOBALS['TYPO3_CONF_VARS']['SYS']['encryptionKey'], self::$hashAlgorithm, TRUE); |
|
| 193 | 193 | // Decrypt data. |
| 194 | 194 | $decrypted = openssl_decrypt($data, self::$cipherAlgorithm, $key, OPENSSL_RAW_DATA, $iv); |
| 195 | 195 | return $decrypted; |
@@ -207,9 +207,9 @@ discard block |
||
| 207 | 207 | public static function getXmlFileAsString($content) |
| 208 | 208 | { |
| 209 | 209 | // Turn off libxml's error logging. |
| 210 | - $libxmlErrors = libxml_use_internal_errors(true); |
|
| 210 | + $libxmlErrors = libxml_use_internal_errors(TRUE); |
|
| 211 | 211 | // Disables the functionality to allow external entities to be loaded when parsing the XML, must be kept |
| 212 | - $previousValueOfEntityLoader = libxml_disable_entity_loader(true); |
|
| 212 | + $previousValueOfEntityLoader = libxml_disable_entity_loader(TRUE); |
|
| 213 | 213 | // Try to load XML from file. |
| 214 | 214 | $xml = simplexml_load_string($content); |
| 215 | 215 | // reset entity loader setting |
@@ -264,9 +264,9 @@ discard block |
||
| 264 | 264 | */ |
| 265 | 265 | public static function digest($string) |
| 266 | 266 | { |
| 267 | - if (!in_array(self::$hashAlgorithm, openssl_get_md_methods(true))) { |
|
| 267 | + if (!in_array(self::$hashAlgorithm, openssl_get_md_methods(TRUE))) { |
|
| 268 | 268 | self::log('OpenSSL library doesn\'t support hash algorithm', LOG_SEVERITY_ERROR); |
| 269 | - return false; |
|
| 269 | + return FALSE; |
|
| 270 | 270 | } |
| 271 | 271 | // Hash string. |
| 272 | 272 | $hashed = openssl_digest($string, self::$hashAlgorithm); |
@@ -285,23 +285,23 @@ discard block |
||
| 285 | 285 | public static function encrypt($string) |
| 286 | 286 | { |
| 287 | 287 | if ( |
| 288 | - !in_array(self::$cipherAlgorithm, openssl_get_cipher_methods(true)) |
|
| 289 | - || !in_array(self::$hashAlgorithm, openssl_get_md_methods(true)) |
|
| 288 | + !in_array(self::$cipherAlgorithm, openssl_get_cipher_methods(TRUE)) |
|
| 289 | + || !in_array(self::$hashAlgorithm, openssl_get_md_methods(TRUE)) |
|
| 290 | 290 | ) { |
| 291 | 291 | self::log('OpenSSL library doesn\'t support cipher and/or hash algorithm', LOG_SEVERITY_ERROR); |
| 292 | - return false; |
|
| 292 | + return FALSE; |
|
| 293 | 293 | } |
| 294 | 294 | if (empty($GLOBALS['TYPO3_CONF_VARS']['SYS']['encryptionKey'])) { |
| 295 | 295 | self::log('No encryption key set in TYPO3 configuration', LOG_SEVERITY_ERROR); |
| 296 | - return false; |
|
| 296 | + return FALSE; |
|
| 297 | 297 | } |
| 298 | 298 | // Generate random initialisation vector. |
| 299 | 299 | $iv = openssl_random_pseudo_bytes(openssl_cipher_iv_length(self::$cipherAlgorithm)); |
| 300 | - $key = openssl_digest($GLOBALS['TYPO3_CONF_VARS']['SYS']['encryptionKey'], self::$hashAlgorithm, true); |
|
| 300 | + $key = openssl_digest($GLOBALS['TYPO3_CONF_VARS']['SYS']['encryptionKey'], self::$hashAlgorithm, TRUE); |
|
| 301 | 301 | // Encrypt data. |
| 302 | 302 | $encrypted = openssl_encrypt($string, self::$cipherAlgorithm, $key, OPENSSL_RAW_DATA, $iv); |
| 303 | 303 | // Merge initialisation vector and encrypted data. |
| 304 | - if ($encrypted !== false) { |
|
| 304 | + if ($encrypted !== FALSE) { |
|
| 305 | 305 | $encrypted = base64_encode($iv . $encrypted); |
| 306 | 306 | } |
| 307 | 307 | return $encrypted; |
@@ -498,7 +498,7 @@ discard block |
||
| 498 | 498 | $lang = $GLOBALS['TSFE']->getLLL($isoCode, $iso639); |
| 499 | 499 | } |
| 500 | 500 | } elseif (\TYPO3_MODE === 'BE') { |
| 501 | - $iso639 = $GLOBALS['LANG']->includeLLFile($file, false, true); |
|
| 501 | + $iso639 = $GLOBALS['LANG']->includeLLFile($file, FALSE, TRUE); |
|
| 502 | 502 | if (!empty($iso639['default'][$isoCode])) { |
| 503 | 503 | $lang = $GLOBALS['LANG']->getLLL($isoCode, $iso639); |
| 504 | 504 | } |
@@ -525,7 +525,7 @@ discard block |
||
| 525 | 525 | * |
| 526 | 526 | * @return string The translated string or the given key on failure |
| 527 | 527 | */ |
| 528 | - public static function getMessage($key, $hsc = false, $default = '') |
|
| 528 | + public static function getMessage($key, $hsc = FALSE, $default = '') |
|
| 529 | 529 | { |
| 530 | 530 | // Set initial output to default value. |
| 531 | 531 | $translated = (string) $default; |
@@ -535,7 +535,7 @@ discard block |
||
| 535 | 535 | if (\TYPO3_MODE === 'FE') { |
| 536 | 536 | self::$messages = $GLOBALS['TSFE']->readLLfile($file); |
| 537 | 537 | } elseif (\TYPO3_MODE === 'BE') { |
| 538 | - self::$messages = $GLOBALS['LANG']->includeLLFile($file, false, true); |
|
| 538 | + self::$messages = $GLOBALS['LANG']->includeLLFile($file, FALSE, TRUE); |
|
| 539 | 539 | } else { |
| 540 | 540 | self::log('Unexpected TYPO3_MODE "' . \TYPO3_MODE . '"', LOG_SEVERITY_ERROR); |
| 541 | 541 | } |
@@ -735,7 +735,7 @@ discard block |
||
| 735 | 735 | * |
| 736 | 736 | * @return array Merged array |
| 737 | 737 | */ |
| 738 | - public static function mergeRecursiveWithOverrule(array $original, array $overrule, $addKeys = true, $includeEmptyValues = true, $enableUnsetFeature = true) |
|
| 738 | + public static function mergeRecursiveWithOverrule(array $original, array $overrule, $addKeys = TRUE, $includeEmptyValues = TRUE, $enableUnsetFeature = TRUE) |
|
| 739 | 739 | { |
| 740 | 740 | \TYPO3\CMS\Core\Utility\ArrayUtility::mergeRecursiveWithOverrule($original, $overrule, $addKeys, $includeEmptyValues, $enableUnsetFeature); |
| 741 | 741 | return $original; |
@@ -753,7 +753,7 @@ discard block |
||
| 753 | 753 | * |
| 754 | 754 | * @return array Array of substituted "NEW..." identifiers and their actual UIDs. |
| 755 | 755 | */ |
| 756 | - public static function processDBasAdmin(array $data = [], array $cmd = [], $reverseOrder = false, $cmdFirst = false) |
|
| 756 | + public static function processDBasAdmin(array $data = [], array $cmd = [], $reverseOrder = FALSE, $cmdFirst = FALSE) |
|
| 757 | 757 | { |
| 758 | 758 | if ( |
| 759 | 759 | \TYPO3_MODE === 'BE' |
@@ -762,7 +762,7 @@ discard block |
||
| 762 | 762 | // Instantiate TYPO3 core engine. |
| 763 | 763 | $dataHandler = GeneralUtility::makeInstance(\TYPO3\CMS\Core\DataHandling\DataHandler::class); |
| 764 | 764 | // We do not use workspaces and have to bypass restrictions in DataHandler. |
| 765 | - $dataHandler->bypassWorkspaceRestrictions = true; |
|
| 765 | + $dataHandler->bypassWorkspaceRestrictions = TRUE; |
|
| 766 | 766 | // Load data and command arrays. |
| 767 | 767 | $dataHandler->start($data, $cmd); |
| 768 | 768 | // Process command map first if default order is reversed. |
@@ -826,19 +826,19 @@ discard block |
||
| 826 | 826 | $key = (string) $key; |
| 827 | 827 | if (!$key) { |
| 828 | 828 | self::log('Invalid key "' . $key . '" for session data saving', LOG_SEVERITY_WARNING); |
| 829 | - return false; |
|
| 829 | + return FALSE; |
|
| 830 | 830 | } |
| 831 | 831 | // Save value in session data. |
| 832 | 832 | if (\TYPO3_MODE === 'FE') { |
| 833 | 833 | $GLOBALS['TSFE']->fe_user->setKey('ses', $key, $value); |
| 834 | 834 | $GLOBALS['TSFE']->fe_user->storeSessionData(); |
| 835 | - return true; |
|
| 835 | + return TRUE; |
|
| 836 | 836 | } elseif (\TYPO3_MODE === 'BE') { |
| 837 | 837 | $GLOBALS['BE_USER']->setAndSaveSessionData($key, $value); |
| 838 | - return true; |
|
| 838 | + return TRUE; |
|
| 839 | 839 | } else { |
| 840 | 840 | self::log('Unexpected TYPO3_MODE "' . \TYPO3_MODE . '"', LOG_SEVERITY_ERROR); |
| 841 | - return false; |
|
| 841 | + return FALSE; |
|
| 842 | 842 | } |
| 843 | 843 | } |
| 844 | 844 | |
@@ -884,7 +884,7 @@ discard block |
||
| 884 | 884 | ->where( |
| 885 | 885 | $queryBuilder->expr()->eq($table . '.pid', $pid), |
| 886 | 886 | $queryBuilder->expr()->eq($table . '.index_name', $queryBuilder->expr()->literal($index_name)), |
| 887 | - self::whereExpression($table, true) |
|
| 887 | + self::whereExpression($table, TRUE) |
|
| 888 | 888 | ) |
| 889 | 889 | ->setMaxResults(1) |
| 890 | 890 | ->execute(); |
@@ -902,7 +902,7 @@ discard block |
||
| 902 | 902 | $queryBuilder->expr()->eq($table . '.pid', $pid), |
| 903 | 903 | $queryBuilder->expr()->eq($table . '.uid', $resArray['l18n_parent']), |
| 904 | 904 | $queryBuilder->expr()->eq($table . '.sys_language_uid', intval($GLOBALS['TSFE']->sys_language_content)), |
| 905 | - self::whereExpression($table, true) |
|
| 905 | + self::whereExpression($table, TRUE) |
|
| 906 | 906 | ) |
| 907 | 907 | ->setMaxResults(1) |
| 908 | 908 | ->execute(); |
@@ -937,7 +937,7 @@ discard block |
||
| 937 | 937 | ->where( |
| 938 | 938 | $queryBuilder->expr()->eq($table . '.pid', $pid), |
| 939 | 939 | $additionalWhere, |
| 940 | - self::whereExpression($table, true) |
|
| 940 | + self::whereExpression($table, TRUE) |
|
| 941 | 941 | ) |
| 942 | 942 | ->setMaxResults(10000) |
| 943 | 943 | ->execute(); |
@@ -977,7 +977,7 @@ discard block |
||
| 977 | 977 | * |
| 978 | 978 | * @return string Additional WHERE expression |
| 979 | 979 | */ |
| 980 | - public static function whereExpression($table, $showHidden = false) |
|
| 980 | + public static function whereExpression($table, $showHidden = FALSE) |
|
| 981 | 981 | { |
| 982 | 982 | if (\TYPO3_MODE === 'FE') { |
| 983 | 983 | // Should we ignore the record's hidden flag? |
@@ -74,7 +74,7 @@ discard block |
||
| 74 | 74 | * @var bool |
| 75 | 75 | * @access protected |
| 76 | 76 | */ |
| 77 | - protected $dmdSecLoaded = false; |
|
| 77 | + protected $dmdSecLoaded = FALSE; |
|
| 78 | 78 | |
| 79 | 79 | /** |
| 80 | 80 | * The extension key |
@@ -100,7 +100,7 @@ discard block |
||
| 100 | 100 | * @var bool |
| 101 | 101 | * @access protected |
| 102 | 102 | */ |
| 103 | - protected $fileGrpsLoaded = false; |
|
| 103 | + protected $fileGrpsLoaded = FALSE; |
|
| 104 | 104 | |
| 105 | 105 | /** |
| 106 | 106 | * This holds the XML file's METS part as \SimpleXMLElement object |
@@ -175,11 +175,11 @@ discard block |
||
| 175 | 175 | IiifHelper::setMaxThumbnailHeight($conf['iiifThumbnailHeight']); |
| 176 | 176 | IiifHelper::setMaxThumbnailWidth($conf['iiifThumbnailWidth']); |
| 177 | 177 | $service = IiifHelper::loadIiifResource($fileLocation); |
| 178 | - if ($service !== null && $service instanceof AbstractImageService) { |
|
| 178 | + if ($service !== NULL && $service instanceof AbstractImageService) { |
|
| 179 | 179 | return $service->getImageUrl(); |
| 180 | 180 | } |
| 181 | 181 | } elseif ($fileMimeType === 'application/vnd.netfpx') { |
| 182 | - $baseURL = $fileLocation . (strpos($fileLocation, '?') === false ? '?' : ''); |
|
| 182 | + $baseURL = $fileLocation . (strpos($fileLocation, '?') === FALSE ? '?' : ''); |
|
| 183 | 183 | // TODO CVT is an optional IIP server capability; in theory, capabilities should be determined in the object request with '&obj=IIP-server' |
| 184 | 184 | return $baseURL . '&CVT=jpeg'; |
| 185 | 185 | } |
@@ -226,7 +226,7 @@ discard block |
||
| 226 | 226 | * {@inheritDoc} |
| 227 | 227 | * @see \Kitodo\Dlf\Common\Document::getLogicalStructure() |
| 228 | 228 | */ |
| 229 | - public function getLogicalStructure($id, $recursive = false) |
|
| 229 | + public function getLogicalStructure($id, $recursive = FALSE) |
|
| 230 | 230 | { |
| 231 | 231 | $details = []; |
| 232 | 232 | // Is the requested logical unit already loaded? |
@@ -267,7 +267,7 @@ discard block |
||
| 267 | 267 | * |
| 268 | 268 | * @return array Array of the element's id, label, type and physical page indexes/mptr link |
| 269 | 269 | */ |
| 270 | - protected function getLogicalStructureInfo(\SimpleXMLElement $structure, $recursive = false) |
|
| 270 | + protected function getLogicalStructureInfo(\SimpleXMLElement $structure, $recursive = FALSE) |
|
| 271 | 271 | { |
| 272 | 272 | // Get attributes. |
| 273 | 273 | foreach ($structure->attributes() as $attribute => $value) { |
@@ -312,7 +312,7 @@ discard block |
||
| 312 | 312 | && array_key_exists($details['id'], $this->smLinks['l2p']) |
| 313 | 313 | ) { |
| 314 | 314 | // Link logical structure to the first corresponding physical page/track. |
| 315 | - $details['points'] = max(intval(array_search($this->smLinks['l2p'][$details['id']][0], $this->physicalStructure, true)), 1); |
|
| 315 | + $details['points'] = max(intval(array_search($this->smLinks['l2p'][$details['id']][0], $this->physicalStructure, TRUE)), 1); |
|
| 316 | 316 | $fileGrpsThumb = GeneralUtility::trimExplode(',', $extConf['fileGrpThumbs']); |
| 317 | 317 | while ($fileGrpThumb = array_shift($fileGrpsThumb)) { |
| 318 | 318 | if (!empty($this->physicalStructureInfo[$this->smLinks['l2p'][$details['id']][0]]['files'][$fileGrpThumb])) { |
@@ -356,7 +356,7 @@ discard block |
||
| 356 | 356 | $details['children'] = []; |
| 357 | 357 | foreach ($structure->children('http://www.loc.gov/METS/')->div as $child) { |
| 358 | 358 | // Repeat for all children. |
| 359 | - $details['children'][] = $this->getLogicalStructureInfo($child, true); |
|
| 359 | + $details['children'][] = $this->getLogicalStructureInfo($child, TRUE); |
|
| 360 | 360 | } |
| 361 | 361 | } |
| 362 | 362 | return $details; |
@@ -425,7 +425,7 @@ discard block |
||
| 425 | 425 | if (!empty($dmdIds)) { |
| 426 | 426 | // Handle multiple DMDIDs separately. |
| 427 | 427 | $dmdIds = explode(' ', $dmdIds); |
| 428 | - $hasSupportedMetadata = false; |
|
| 428 | + $hasSupportedMetadata = FALSE; |
|
| 429 | 429 | } else { |
| 430 | 430 | // There is no dmdSec for this structure node. |
| 431 | 431 | return []; |
@@ -654,7 +654,7 @@ discard block |
||
| 654 | 654 | $metadata['owner'][0] = $resArray['owner']; |
| 655 | 655 | } |
| 656 | 656 | // Extract metadata only from first supported dmdSec. |
| 657 | - $hasSupportedMetadata = true; |
|
| 657 | + $hasSupportedMetadata = TRUE; |
|
| 658 | 658 | break; |
| 659 | 659 | } |
| 660 | 660 | if ($hasSupportedMetadata) { |
@@ -720,16 +720,16 @@ discard block |
||
| 720 | 720 | protected function loadLocation($location) |
| 721 | 721 | { |
| 722 | 722 | $fileResource = GeneralUtility::getUrl($location); |
| 723 | - if ($fileResource !== false) { |
|
| 723 | + if ($fileResource !== FALSE) { |
|
| 724 | 724 | $xml = Helper::getXmlFileAsString($fileResource); |
| 725 | 725 | // Set some basic properties. |
| 726 | - if ($xml !== false) { |
|
| 726 | + if ($xml !== FALSE) { |
|
| 727 | 727 | $this->xml = $xml; |
| 728 | - return true; |
|
| 728 | + return TRUE; |
|
| 729 | 729 | } |
| 730 | 730 | } |
| 731 | 731 | $this->logger->error('Could not load XML file from "' . $location . '"'); |
| 732 | - return false; |
|
| 732 | + return FALSE; |
|
| 733 | 733 | } |
| 734 | 734 | |
| 735 | 735 | /** |
@@ -777,9 +777,9 @@ discard block |
||
| 777 | 777 | |
| 778 | 778 | if ($preloadedDocument instanceof \SimpleXMLElement) { |
| 779 | 779 | $this->xml = $preloadedDocument; |
| 780 | - return true; |
|
| 780 | + return TRUE; |
|
| 781 | 781 | } |
| 782 | - return false; |
|
| 782 | + return FALSE; |
|
| 783 | 783 | } |
| 784 | 784 | |
| 785 | 785 | /** |
@@ -825,7 +825,7 @@ discard block |
||
| 825 | 825 | } |
| 826 | 826 | } |
| 827 | 827 | } |
| 828 | - $this->dmdSecLoaded = true; |
|
| 828 | + $this->dmdSecLoaded = TRUE; |
|
| 829 | 829 | } |
| 830 | 830 | return $this->dmdSec; |
| 831 | 831 | } |
@@ -872,9 +872,9 @@ discard block |
||
| 872 | 872 | !empty($extConf['fileGrpFulltext']) |
| 873 | 873 | && array_intersect(GeneralUtility::trimExplode(',', $extConf['fileGrpFulltext']), $this->fileGrps) !== [] |
| 874 | 874 | ) { |
| 875 | - $this->hasFulltext = true; |
|
| 875 | + $this->hasFulltext = TRUE; |
|
| 876 | 876 | } |
| 877 | - $this->fileGrpsLoaded = true; |
|
| 877 | + $this->fileGrpsLoaded = TRUE; |
|
| 878 | 878 | } |
| 879 | 879 | return $this->fileGrps; |
| 880 | 880 | } |
@@ -963,7 +963,7 @@ discard block |
||
| 963 | 963 | $this->physicalStructure = array_merge($physSeq, $elements); |
| 964 | 964 | } |
| 965 | 965 | } |
| 966 | - $this->physicalStructureLoaded = true; |
|
| 966 | + $this->physicalStructureLoaded = TRUE; |
|
| 967 | 967 | } |
| 968 | 968 | return $this->physicalStructure; |
| 969 | 969 | } |
@@ -982,7 +982,7 @@ discard block |
||
| 982 | 982 | $this->smLinks['p2l'][(string) $smLink->attributes('http://www.w3.org/1999/xlink')->to][] = (string) $smLink->attributes('http://www.w3.org/1999/xlink')->from; |
| 983 | 983 | } |
| 984 | 984 | } |
| 985 | - $this->smLinksLoaded = true; |
|
| 985 | + $this->smLinksLoaded = TRUE; |
|
| 986 | 986 | } |
| 987 | 987 | return $this->smLinks; |
| 988 | 988 | } |
@@ -991,7 +991,7 @@ discard block |
||
| 991 | 991 | * {@inheritDoc} |
| 992 | 992 | * @see \Kitodo\Dlf\Common\Document::_getThumbnail() |
| 993 | 993 | */ |
| 994 | - protected function _getThumbnail($forceReload = false) |
|
| 994 | + protected function _getThumbnail($forceReload = FALSE) |
|
| 995 | 995 | { |
| 996 | 996 | if ( |
| 997 | 997 | !$this->thumbnailLoaded |
@@ -1001,14 +1001,14 @@ discard block |
||
| 1001 | 1001 | $cPid = ($this->cPid ? $this->cPid : $this->pid); |
| 1002 | 1002 | if (!$cPid) { |
| 1003 | 1003 | $this->logger->error('Invalid PID ' . $cPid . ' for structure definitions'); |
| 1004 | - $this->thumbnailLoaded = true; |
|
| 1004 | + $this->thumbnailLoaded = TRUE; |
|
| 1005 | 1005 | return $this->thumbnail; |
| 1006 | 1006 | } |
| 1007 | 1007 | // Load extension configuration. |
| 1008 | 1008 | $extConf = GeneralUtility::makeInstance(ExtensionConfiguration::class)->get(self::$extKey); |
| 1009 | 1009 | if (empty($extConf['fileGrpThumbs'])) { |
| 1010 | 1010 | $this->logger->warning('No fileGrp for thumbnails specified'); |
| 1011 | - $this->thumbnailLoaded = true; |
|
| 1011 | + $this->thumbnailLoaded = TRUE; |
|
| 1012 | 1012 | return $this->thumbnail; |
| 1013 | 1013 | } |
| 1014 | 1014 | $strctId = $this->_getToplevelId(); |
@@ -1062,7 +1062,7 @@ discard block |
||
| 1062 | 1062 | } else { |
| 1063 | 1063 | $this->logger->error('No structure of type "' . $metadata['type'][0] . '" found in database'); |
| 1064 | 1064 | } |
| 1065 | - $this->thumbnailLoaded = true; |
|
| 1065 | + $this->thumbnailLoaded = TRUE; |
|
| 1066 | 1066 | } |
| 1067 | 1067 | return $this->thumbnail; |
| 1068 | 1068 | } |
@@ -1121,8 +1121,8 @@ discard block |
||
| 1121 | 1121 | public function __toString() |
| 1122 | 1122 | { |
| 1123 | 1123 | $xml = new \DOMDocument('1.0', 'utf-8'); |
| 1124 | - $xml->appendChild($xml->importNode(dom_import_simplexml($this->mets), true)); |
|
| 1125 | - $xml->formatOutput = true; |
|
| 1124 | + $xml->appendChild($xml->importNode(dom_import_simplexml($this->mets), TRUE)); |
|
| 1125 | + $xml->formatOutput = TRUE; |
|
| 1126 | 1126 | return $xml->saveXML(); |
| 1127 | 1127 | } |
| 1128 | 1128 | |
@@ -1137,7 +1137,7 @@ discard block |
||
| 1137 | 1137 | public function __wakeup() |
| 1138 | 1138 | { |
| 1139 | 1139 | $xml = Helper::getXmlFileAsString($this->asXML); |
| 1140 | - if ($xml !== false) { |
|
| 1140 | + if ($xml !== FALSE) { |
|
| 1141 | 1141 | $this->asXML = ''; |
| 1142 | 1142 | $this->xml = $xml; |
| 1143 | 1143 | // Rebuild the unserializable properties. |