We could not synchronize checks via GitHub's checks API since Scrutinizer's GitHub App is not installed for this repository.
@@ -17,7 +17,8 @@ discard block |
||
| 17 | 17 | * @subpackage tx_dlf |
| 18 | 18 | * @access public |
| 19 | 19 | */ |
| 20 | -class tx_dlf_pageview extends tx_dlf_plugin { |
|
| 20 | +class tx_dlf_pageview extends tx_dlf_plugin |
|
| 21 | +{ |
|
| 21 | 22 | |
| 22 | 23 | public $scriptRelPath = 'plugins/pageview/class.tx_dlf_pageview.php'; |
| 23 | 24 | |
@@ -52,7 +53,8 @@ discard block |
||
| 52 | 53 | * |
| 53 | 54 | * @return string Viewer script tags ready for output |
| 54 | 55 | */ |
| 55 | - protected function addViewerJS() { |
|
| 56 | + protected function addViewerJS() |
|
| 57 | + { |
|
| 56 | 58 | |
| 57 | 59 | $output = array (); |
| 58 | 60 | $tmp = $this->getFulltext($this->piVars['page']); |
@@ -121,7 +123,8 @@ discard block |
||
| 121 | 123 | * |
| 122 | 124 | * @return array Marker array |
| 123 | 125 | */ |
| 124 | - protected function addInteraction() { |
|
| 126 | + protected function addInteraction() |
|
| 127 | + { |
|
| 125 | 128 | |
| 126 | 129 | $markerArray = array (); |
| 127 | 130 | |
@@ -169,7 +172,8 @@ discard block |
||
| 169 | 172 | * |
| 170 | 173 | * @return array Marker array |
| 171 | 174 | */ |
| 172 | - protected function addBasketForm() { |
|
| 175 | + protected function addBasketForm() |
|
| 176 | + { |
|
| 173 | 177 | |
| 174 | 178 | $markerArray = array (); |
| 175 | 179 | |
@@ -246,7 +250,8 @@ discard block |
||
| 246 | 250 | * |
| 247 | 251 | * @return array URL and MIME type of image file |
| 248 | 252 | */ |
| 249 | - protected function getImage($page) { |
|
| 253 | + protected function getImage($page) |
|
| 254 | + { |
|
| 250 | 255 | |
| 251 | 256 | $image = array (); |
| 252 | 257 | |
@@ -299,7 +304,8 @@ discard block |
||
| 299 | 304 | * |
| 300 | 305 | * @return array URL and MIME type of fulltext file |
| 301 | 306 | */ |
| 302 | - protected function getFulltext($page) { |
|
| 307 | + protected function getFulltext($page) |
|
| 308 | + { |
|
| 303 | 309 | |
| 304 | 310 | $fulltext = array (); |
| 305 | 311 | |
@@ -342,7 +348,8 @@ discard block |
||
| 342 | 348 | * |
| 343 | 349 | * @return string The content that is displayed on the website |
| 344 | 350 | */ |
| 345 | - public function main($content, $conf) { |
|
| 351 | + public function main($content, $conf) |
|
| 352 | + { |
|
| 346 | 353 | |
| 347 | 354 | $this->init($conf); |
| 348 | 355 | |
@@ -27,7 +27,7 @@ discard block |
||
| 27 | 27 | * @var array |
| 28 | 28 | * @access protected |
| 29 | 29 | */ |
| 30 | - protected $controls = array (); |
|
| 30 | + protected $controls = array(); |
|
| 31 | 31 | |
| 32 | 32 | /** |
| 33 | 33 | * Holds the current images' URLs and MIME types |
@@ -35,7 +35,7 @@ discard block |
||
| 35 | 35 | * @var array |
| 36 | 36 | * @access protected |
| 37 | 37 | */ |
| 38 | - protected $images = array (); |
|
| 38 | + protected $images = array(); |
|
| 39 | 39 | |
| 40 | 40 | /** |
| 41 | 41 | * Holds the current fulltexts' URLs |
@@ -43,7 +43,7 @@ discard block |
||
| 43 | 43 | * @var array |
| 44 | 44 | * @access protected |
| 45 | 45 | */ |
| 46 | - protected $fulltexts = array (); |
|
| 46 | + protected $fulltexts = array(); |
|
| 47 | 47 | |
| 48 | 48 | /** |
| 49 | 49 | * Adds Viewer javascript |
@@ -54,7 +54,7 @@ discard block |
||
| 54 | 54 | */ |
| 55 | 55 | protected function addViewerJS() { |
| 56 | 56 | |
| 57 | - $output = array (); |
|
| 57 | + $output = array(); |
|
| 58 | 58 | $tmp = $this->getFulltext($this->piVars['page']); |
| 59 | 59 | $bTeiXml = false; |
| 60 | 60 | if (isset($tmp['mimetype']) && $tmp['mimetype'] == 'application/tei+xml') { |
@@ -62,36 +62,36 @@ discard block |
||
| 62 | 62 | } |
| 63 | 63 | |
| 64 | 64 | // Add OpenLayers library. |
| 65 | - $output[] = '<link type="text/css" rel="stylesheet" href="'.\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::siteRelPath($this->extKey).'lib/OpenLayers/ol3.css">'; |
|
| 65 | + $output[] = '<link type="text/css" rel="stylesheet" href="' . \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::siteRelPath($this->extKey) . 'lib/OpenLayers/ol3.css">'; |
|
| 66 | 66 | |
| 67 | - $output[] = '<script type="text/javascript" src="'.\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::siteRelPath($this->extKey).'lib/OpenLayers/glif.min.js"></script>'; |
|
| 67 | + $output[] = '<script type="text/javascript" src="' . \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::siteRelPath($this->extKey) . 'lib/OpenLayers/glif.min.js"></script>'; |
|
| 68 | 68 | |
| 69 | - $output[] = '<script type="text/javascript" src="'.\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::siteRelPath($this->extKey).'lib/OpenLayers/ol3-dlf.js"></script>'; |
|
| 69 | + $output[] = '<script type="text/javascript" src="' . \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::siteRelPath($this->extKey) . 'lib/OpenLayers/ol3-dlf.js"></script>'; |
|
| 70 | 70 | |
| 71 | 71 | // Add viewer library. |
| 72 | - $output[] = '<script type="text/javascript" src="'.\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::siteRelPath($this->extKey).'plugins/pageview/tx_dlf_utils.js"></script>'; |
|
| 72 | + $output[] = '<script type="text/javascript" src="' . \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::siteRelPath($this->extKey) . 'plugins/pageview/tx_dlf_utils.js"></script>'; |
|
| 73 | 73 | |
| 74 | - $output[] = '<script type="text/javascript" src="'.\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::siteRelPath($this->extKey).'plugins/pageview/tx_dlf_ol3.js"></script>'; |
|
| 74 | + $output[] = '<script type="text/javascript" src="' . \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::siteRelPath($this->extKey) . 'plugins/pageview/tx_dlf_ol3.js"></script>'; |
|
| 75 | 75 | |
| 76 | - $output[] = '<script type="text/javascript" src="'.\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::siteRelPath($this->extKey).'plugins/pageview/tx_dlf_ol3_styles.js"></script>'; |
|
| 76 | + $output[] = '<script type="text/javascript" src="' . \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::siteRelPath($this->extKey) . 'plugins/pageview/tx_dlf_ol3_styles.js"></script>'; |
|
| 77 | 77 | |
| 78 | - $output[] = '<script type="text/javascript" src="'.\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::siteRelPath($this->extKey).'plugins/pageview/tx_dlf_ol3_source.js"></script>'; |
|
| 78 | + $output[] = '<script type="text/javascript" src="' . \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::siteRelPath($this->extKey) . 'plugins/pageview/tx_dlf_ol3_source.js"></script>'; |
|
| 79 | 79 | |
| 80 | 80 | if ($bTeiXml) { |
| 81 | - $output[] = '<script type="text/javascript" src="'.\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::siteRelPath($this->extKey).'plugins/pageview/tx_dlf_teiparser.js"></script>'; |
|
| 81 | + $output[] = '<script type="text/javascript" src="' . \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::siteRelPath($this->extKey) . 'plugins/pageview/tx_dlf_teiparser.js"></script>'; |
|
| 82 | 82 | } else { |
| 83 | - $output[] = '<script type="text/javascript" src="'.\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::siteRelPath($this->extKey).'plugins/pageview/tx_dlf_altoparser.js"></script>'; |
|
| 83 | + $output[] = '<script type="text/javascript" src="' . \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::siteRelPath($this->extKey) . 'plugins/pageview/tx_dlf_altoparser.js"></script>'; |
|
| 84 | 84 | } |
| 85 | 85 | |
| 86 | - $output[] = '<script type="text/javascript" src="'.\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::siteRelPath($this->extKey).'plugins/pageview/tx_dlf_pageview_imagemanipulation_control.js"></script>'; |
|
| 86 | + $output[] = '<script type="text/javascript" src="' . \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::siteRelPath($this->extKey) . 'plugins/pageview/tx_dlf_pageview_imagemanipulation_control.js"></script>'; |
|
| 87 | 87 | |
| 88 | 88 | if ($bTeiXml) { |
| 89 | - $output[] = '<script type="text/javascript" src="'.\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::siteRelPath($this->extKey).'plugins/pageview/tx_dlf_pageview_teifulltext_control.js"></script>'; |
|
| 89 | + $output[] = '<script type="text/javascript" src="' . \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::siteRelPath($this->extKey) . 'plugins/pageview/tx_dlf_pageview_teifulltext_control.js"></script>'; |
|
| 90 | 90 | } else { |
| 91 | - $output[] = '<script type="text/javascript" src="'.\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::siteRelPath($this->extKey).'plugins/pageview/tx_dlf_pageview_fulltext_control.js"></script>'; |
|
| 91 | + $output[] = '<script type="text/javascript" src="' . \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::siteRelPath($this->extKey) . 'plugins/pageview/tx_dlf_pageview_fulltext_control.js"></script>'; |
|
| 92 | 92 | } |
| 93 | 93 | |
| 94 | - $output[] = '<script type="text/javascript" src="'.\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::siteRelPath($this->extKey).'plugins/pageview/tx_dlf_pageview.js"></script>'; |
|
| 94 | + $output[] = '<script type="text/javascript" src="' . \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::siteRelPath($this->extKey) . 'plugins/pageview/tx_dlf_pageview.js"></script>'; |
|
| 95 | 95 | |
| 96 | 96 | // Add viewer configuration. |
| 97 | 97 | $output[] = ' |
@@ -99,12 +99,12 @@ discard block |
||
| 99 | 99 | window.onload = function() { |
| 100 | 100 | if (dlfUtils.exists(dlfViewer)) { |
| 101 | 101 | tx_dlf_viewer = new dlfViewer({ |
| 102 | - controls: ["'.implode('", "', $this->controls).'"], |
|
| 103 | - div: "'.$this->conf['elementId'].'", |
|
| 104 | - images: '.json_encode($this->images).', |
|
| 105 | - fulltexts: '.json_encode($this->fulltexts).', |
|
| 106 | - teifulltext: '.(($bTeiXml) ? 'true' : 'false').', |
|
| 107 | - useInternalProxy: '.($this->conf['useInternalProxy'] ? 1 : 0).' |
|
| 102 | + controls: ["'.implode('", "', $this->controls) . '"], |
|
| 103 | + div: "'.$this->conf['elementId'] . '", |
|
| 104 | + images: '.json_encode($this->images) . ', |
|
| 105 | + fulltexts: '.json_encode($this->fulltexts) . ', |
|
| 106 | + teifulltext: '.(($bTeiXml) ? 'true' : 'false') . ', |
|
| 107 | + useInternalProxy: '.($this->conf['useInternalProxy'] ? 1 : 0) . ' |
|
| 108 | 108 | }) |
| 109 | 109 | } |
| 110 | 110 | } |
@@ -123,7 +123,7 @@ discard block |
||
| 123 | 123 | */ |
| 124 | 124 | protected function addInteraction() { |
| 125 | 125 | |
| 126 | - $markerArray = array (); |
|
| 126 | + $markerArray = array(); |
|
| 127 | 127 | |
| 128 | 128 | if ($this->piVars['id']) { |
| 129 | 129 | |
@@ -135,9 +135,9 @@ discard block |
||
| 135 | 135 | |
| 136 | 136 | if ($this->conf['crop']) { |
| 137 | 137 | |
| 138 | - $markerArray['###EDITBUTTON###'] = '<a href="javascript: tx_dlf_viewer.activateSelection();">'.$this->pi_getLL('editMode', '', TRUE).'</a>'; |
|
| 138 | + $markerArray['###EDITBUTTON###'] = '<a href="javascript: tx_dlf_viewer.activateSelection();">' . $this->pi_getLL('editMode', '', TRUE) . '</a>'; |
|
| 139 | 139 | |
| 140 | - $markerArray['###EDITREMOVE###'] = '<a href="javascript: tx_dlf_viewer.resetCropSelection();">'.$this->pi_getLL('editRemove', '', TRUE).'</a>'; |
|
| 140 | + $markerArray['###EDITREMOVE###'] = '<a href="javascript: tx_dlf_viewer.resetCropSelection();">' . $this->pi_getLL('editRemove', '', TRUE) . '</a>'; |
|
| 141 | 141 | |
| 142 | 142 | } else { |
| 143 | 143 | |
@@ -149,7 +149,7 @@ discard block |
||
| 149 | 149 | |
| 150 | 150 | if ($this->conf['magnifier']) { |
| 151 | 151 | |
| 152 | - $markerArray['###MAGNIFIER###'] = '<a href="javascript: tx_dlf_viewer.activateMagnifier();">'.$this->pi_getLL('magnifier', '', TRUE).'</a>'; |
|
| 152 | + $markerArray['###MAGNIFIER###'] = '<a href="javascript: tx_dlf_viewer.activateMagnifier();">' . $this->pi_getLL('magnifier', '', TRUE) . '</a>'; |
|
| 153 | 153 | |
| 154 | 154 | } else { |
| 155 | 155 | |
@@ -171,14 +171,14 @@ discard block |
||
| 171 | 171 | */ |
| 172 | 172 | protected function addBasketForm() { |
| 173 | 173 | |
| 174 | - $markerArray = array (); |
|
| 174 | + $markerArray = array(); |
|
| 175 | 175 | |
| 176 | 176 | // Add basket button |
| 177 | 177 | if ($this->conf['basketButton'] && $this->conf['targetBasket'] && $this->piVars['id']) { |
| 178 | 178 | |
| 179 | 179 | $label = $this->pi_getLL('addBasket', '', TRUE); |
| 180 | 180 | |
| 181 | - $params = array ( |
|
| 181 | + $params = array( |
|
| 182 | 182 | 'id' => $this->piVars['id'], |
| 183 | 183 | 'addToBasket' => TRUE |
| 184 | 184 | ); |
@@ -189,17 +189,17 @@ discard block |
||
| 189 | 189 | |
| 190 | 190 | } |
| 191 | 191 | |
| 192 | - $basketConf = array ( |
|
| 192 | + $basketConf = array( |
|
| 193 | 193 | 'parameter' => $this->conf['targetBasket'], |
| 194 | 194 | 'additionalParams' => \TYPO3\CMS\Core\Utility\GeneralUtility::implodeArrayForUrl($this->prefixId, $params, '', TRUE, FALSE), |
| 195 | 195 | 'title' => $label |
| 196 | 196 | ); |
| 197 | 197 | |
| 198 | - $output = '<form id="addToBasketForm" action="'.$this->cObj->typoLink_URL($basketConf).'" method="post">'; |
|
| 198 | + $output = '<form id="addToBasketForm" action="' . $this->cObj->typoLink_URL($basketConf) . '" method="post">'; |
|
| 199 | 199 | |
| 200 | - $output .= '<input type="hidden" name="tx_dlf[startpage]" id="startpage" value="'.htmlspecialchars($this->piVars['page']).'">'; |
|
| 200 | + $output .= '<input type="hidden" name="tx_dlf[startpage]" id="startpage" value="' . htmlspecialchars($this->piVars['page']) . '">'; |
|
| 201 | 201 | |
| 202 | - $output .= '<input type="hidden" name="tx_dlf[endpage]" id="endpage" value="'.htmlspecialchars($this->piVars['page']).'">'; |
|
| 202 | + $output .= '<input type="hidden" name="tx_dlf[endpage]" id="endpage" value="' . htmlspecialchars($this->piVars['page']) . '">'; |
|
| 203 | 203 | |
| 204 | 204 | $output .= '<input type="hidden" name="tx_dlf[startX]" id="startX">'; |
| 205 | 205 | |
@@ -211,7 +211,7 @@ discard block |
||
| 211 | 211 | |
| 212 | 212 | $output .= '<input type="hidden" name="tx_dlf[rotation]" id="rotation">'; |
| 213 | 213 | |
| 214 | - $output .= '<button id="submitBasketForm" onclick="this.form.submit()">'.$label.'</button>'; |
|
| 214 | + $output .= '<button id="submitBasketForm" onclick="this.form.submit()">' . $label . '</button>'; |
|
| 215 | 215 | |
| 216 | 216 | $output .= '</form>'; |
| 217 | 217 | |
@@ -248,7 +248,7 @@ discard block |
||
| 248 | 248 | */ |
| 249 | 249 | protected function getImage($page) { |
| 250 | 250 | |
| 251 | - $image = array (); |
|
| 251 | + $image = array(); |
|
| 252 | 252 | |
| 253 | 253 | // Get @USE value of METS fileGrp. |
| 254 | 254 | $fileGrps = \TYPO3\CMS\Core\Utility\GeneralUtility::trimExplode(',', $this->conf['fileGrps']); |
@@ -262,9 +262,9 @@ discard block |
||
| 262 | 262 | |
| 263 | 263 | if ($this->conf['useInternalProxy']) { |
| 264 | 264 | // Configure @action URL for form. |
| 265 | - $linkConf = array ( |
|
| 265 | + $linkConf = array( |
|
| 266 | 266 | 'parameter' => $GLOBALS['TSFE']->id, |
| 267 | - 'additionalParams' => '&eID=tx_dlf_geturl_eid&url='.urlencode($image['url']), |
|
| 267 | + 'additionalParams' => '&eID=tx_dlf_geturl_eid&url=' . urlencode($image['url']), |
|
| 268 | 268 | ); |
| 269 | 269 | |
| 270 | 270 | $image['url'] = $this->cObj->typoLink_URL($linkConf); |
@@ -278,7 +278,7 @@ discard block |
||
| 278 | 278 | |
| 279 | 279 | if (TYPO3_DLOG) { |
| 280 | 280 | |
| 281 | - \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('[tx_dlf_pageview->getImage('.$page.')] File not found in fileGrp "'.$fileGrp.'"', $this->extKey, SYSLOG_SEVERITY_WARNING); |
|
| 281 | + \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('[tx_dlf_pageview->getImage(' . $page . ')] File not found in fileGrp "' . $fileGrp . '"', $this->extKey, SYSLOG_SEVERITY_WARNING); |
|
| 282 | 282 | |
| 283 | 283 | } |
| 284 | 284 | |
@@ -301,7 +301,7 @@ discard block |
||
| 301 | 301 | */ |
| 302 | 302 | protected function getFulltext($page) { |
| 303 | 303 | |
| 304 | - $fulltext = array (); |
|
| 304 | + $fulltext = array(); |
|
| 305 | 305 | |
| 306 | 306 | // Get fulltext link. |
| 307 | 307 | if (!empty($this->doc->physicalStructureInfo[$this->doc->physicalStructure[$page]]['files'][$this->conf['fileGrpFulltext']])) { |
@@ -309,9 +309,9 @@ discard block |
||
| 309 | 309 | $fulltext['url'] = $this->doc->getFileLocation($this->doc->physicalStructureInfo[$this->doc->physicalStructure[$page]]['files'][$this->conf['fileGrpFulltext']]); |
| 310 | 310 | |
| 311 | 311 | // Configure @action URL for form. |
| 312 | - $linkConf = array ( |
|
| 312 | + $linkConf = array( |
|
| 313 | 313 | 'parameter' => $GLOBALS['TSFE']->id, |
| 314 | - 'additionalParams' => '&eID=tx_dlf_geturl_eid&url='.urlencode($fulltext['url']), |
|
| 314 | + 'additionalParams' => '&eID=tx_dlf_geturl_eid&url=' . urlencode($fulltext['url']), |
|
| 315 | 315 | ); |
| 316 | 316 | |
| 317 | 317 | $fulltext['url'] = $this->cObj->typoLink_URL($linkConf); |
@@ -322,7 +322,7 @@ discard block |
||
| 322 | 322 | |
| 323 | 323 | if (TYPO3_DLOG) { |
| 324 | 324 | |
| 325 | - \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('[tx_dlf_pageview->getFulltext('.$page.')] File not found in fileGrp "'.$this->conf['fileGrpFulltext'].'"', $this->extKey, SYSLOG_SEVERITY_WARNING); |
|
| 325 | + \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('[tx_dlf_pageview->getFulltext(' . $page . ')] File not found in fileGrp "' . $this->conf['fileGrpFulltext'] . '"', $this->extKey, SYSLOG_SEVERITY_WARNING); |
|
| 326 | 326 | |
| 327 | 327 | } |
| 328 | 328 | |
@@ -406,7 +406,7 @@ discard block |
||
| 406 | 406 | $this->controls = explode(',', $this->conf['features']); |
| 407 | 407 | |
| 408 | 408 | // Fill in the template markers. |
| 409 | - $markerArray = array ( |
|
| 409 | + $markerArray = array( |
|
| 410 | 410 | '###VIEWER_JS###' => $this->addViewerJS() |
| 411 | 411 | ); |
| 412 | 412 | |
@@ -52,7 +52,7 @@ discard block |
||
| 52 | 52 | * @var boolean |
| 53 | 53 | * @access protected |
| 54 | 54 | */ |
| 55 | - protected $dmdSecLoaded = FALSE; |
|
| 55 | + protected $dmdSecLoaded = false; |
|
| 56 | 56 | |
| 57 | 57 | /** |
| 58 | 58 | * The extension key |
@@ -78,7 +78,7 @@ discard block |
||
| 78 | 78 | * @var boolean |
| 79 | 79 | * @access protected |
| 80 | 80 | */ |
| 81 | - protected $fileGrpsLoaded = FALSE; |
|
| 81 | + protected $fileGrpsLoaded = false; |
|
| 82 | 82 | |
| 83 | 83 | /** |
| 84 | 84 | * This holds the configuration for all supported metadata encodings |
@@ -109,7 +109,7 @@ discard block |
||
| 109 | 109 | * @var boolean |
| 110 | 110 | * @access protected |
| 111 | 111 | */ |
| 112 | - protected $formatsLoaded = FALSE; |
|
| 112 | + protected $formatsLoaded = false; |
|
| 113 | 113 | |
| 114 | 114 | /** |
| 115 | 115 | * Are there any fulltext files available? |
@@ -117,7 +117,7 @@ discard block |
||
| 117 | 117 | * @var boolean |
| 118 | 118 | * @access protected |
| 119 | 119 | */ |
| 120 | - protected $hasFulltext = FALSE; |
|
| 120 | + protected $hasFulltext = false; |
|
| 121 | 121 | |
| 122 | 122 | /** |
| 123 | 123 | * Mimetype of fulltext application/tei+xml or text/xml? |
@@ -133,7 +133,7 @@ discard block |
||
| 133 | 133 | * @var array |
| 134 | 134 | * @access protected |
| 135 | 135 | */ |
| 136 | - protected $lastSearchedPhysicalPage = array ('logicalPage' => NULL, 'physicalPage' => NULL); |
|
| 136 | + protected $lastSearchedPhysicalPage = array ('logicalPage' => null, 'physicalPage' => null); |
|
| 137 | 137 | |
| 138 | 138 | /** |
| 139 | 139 | * This holds the documents location |
@@ -166,7 +166,7 @@ discard block |
||
| 166 | 166 | * @var boolean |
| 167 | 167 | * @access protected |
| 168 | 168 | */ |
| 169 | - protected $metadataArrayLoaded = FALSE; |
|
| 169 | + protected $metadataArrayLoaded = false; |
|
| 170 | 170 | |
| 171 | 171 | /** |
| 172 | 172 | * This holds the XML file's METS part as SimpleXMLElement object |
@@ -215,7 +215,7 @@ discard block |
||
| 215 | 215 | * @var boolean |
| 216 | 216 | * @access protected |
| 217 | 217 | */ |
| 218 | - protected $physicalStructureLoaded = FALSE; |
|
| 218 | + protected $physicalStructureLoaded = false; |
|
| 219 | 219 | |
| 220 | 220 | /** |
| 221 | 221 | * This holds the PID of the document or zero if not in database |
@@ -239,7 +239,7 @@ discard block |
||
| 239 | 239 | * @var boolean |
| 240 | 240 | * @access protected |
| 241 | 241 | */ |
| 242 | - protected $ready = FALSE; |
|
| 242 | + protected $ready = false; |
|
| 243 | 243 | |
| 244 | 244 | /** |
| 245 | 245 | * The METS file's record identifier |
@@ -272,7 +272,7 @@ discard block |
||
| 272 | 272 | * @var boolean |
| 273 | 273 | * @access protected |
| 274 | 274 | */ |
| 275 | - protected $rootIdLoaded = FALSE; |
|
| 275 | + protected $rootIdLoaded = false; |
|
| 276 | 276 | |
| 277 | 277 | /** |
| 278 | 278 | * This holds the smLinks between logical and physical structMap |
@@ -289,7 +289,7 @@ discard block |
||
| 289 | 289 | * @var boolean |
| 290 | 290 | * @access protected |
| 291 | 291 | */ |
| 292 | - protected $smLinksLoaded = FALSE; |
|
| 292 | + protected $smLinksLoaded = false; |
|
| 293 | 293 | |
| 294 | 294 | /** |
| 295 | 295 | * This holds the logical structure |
@@ -306,7 +306,7 @@ discard block |
||
| 306 | 306 | * @var boolean |
| 307 | 307 | * @access protected |
| 308 | 308 | */ |
| 309 | - protected $tableOfContentsLoaded = FALSE; |
|
| 309 | + protected $tableOfContentsLoaded = false; |
|
| 310 | 310 | |
| 311 | 311 | /** |
| 312 | 312 | * This holds the document's thumbnail location. |
@@ -323,7 +323,7 @@ discard block |
||
| 323 | 323 | * @var boolean |
| 324 | 324 | * @access protected |
| 325 | 325 | */ |
| 326 | - protected $thumbnailLoaded = FALSE; |
|
| 326 | + protected $thumbnailLoaded = false; |
|
| 327 | 327 | |
| 328 | 328 | /** |
| 329 | 329 | * This holds the toplevel structure's @ID |
@@ -454,7 +454,7 @@ discard block |
||
| 454 | 454 | * |
| 455 | 455 | * @return &tx_dlf_document Instance of this class |
| 456 | 456 | */ |
| 457 | - public static function &getInstance($uid, $pid = 0, $forceReload = FALSE) { |
|
| 457 | + public static function &getInstance($uid, $pid = 0, $forceReload = false) { |
|
| 458 | 458 | |
| 459 | 459 | // Sanitize input. |
| 460 | 460 | $pid = max(intval($pid), 0); |
@@ -537,7 +537,7 @@ discard block |
||
| 537 | 537 | * |
| 538 | 538 | * @return array Array of the element's id, label, type and physical page indexes/mptr link |
| 539 | 539 | */ |
| 540 | - public function getLogicalStructure($id, $recursive = FALSE) { |
|
| 540 | + public function getLogicalStructure($id, $recursive = false) { |
|
| 541 | 541 | |
| 542 | 542 | $details = array (); |
| 543 | 543 | |
@@ -571,7 +571,7 @@ discard block |
||
| 571 | 571 | // Walk the logical structure recursively and fill the whole table of contents. |
| 572 | 572 | foreach ($divs as $div) { |
| 573 | 573 | |
| 574 | - $this->tableOfContents[] = $this->getLogicalStructureInfo($div, TRUE); |
|
| 574 | + $this->tableOfContents[] = $this->getLogicalStructureInfo($div, true); |
|
| 575 | 575 | |
| 576 | 576 | } |
| 577 | 577 | |
@@ -593,7 +593,7 @@ discard block |
||
| 593 | 593 | * |
| 594 | 594 | * @return array Array of the element's id, label, type and physical page indexes/mptr link |
| 595 | 595 | */ |
| 596 | - protected function getLogicalStructureInfo(SimpleXMLElement $structure, $recursive = FALSE) { |
|
| 596 | + protected function getLogicalStructureInfo(SimpleXMLElement $structure, $recursive = false) { |
|
| 597 | 597 | |
| 598 | 598 | // Get attributes. |
| 599 | 599 | foreach ($structure->attributes() as $attribute => $value) { |
@@ -659,7 +659,7 @@ discard block |
||
| 659 | 659 | // Are there any physical elements and is this logical unit linked to at least one of them? |
| 660 | 660 | } elseif (!empty($this->physicalStructure) && array_key_exists($details['id'], $this->smLinks['l2p'])) { |
| 661 | 661 | |
| 662 | - $details['points'] = max(intval(array_search($this->smLinks['l2p'][$details['id']][0], $this->physicalStructure, TRUE)), 1); |
|
| 662 | + $details['points'] = max(intval(array_search($this->smLinks['l2p'][$details['id']][0], $this->physicalStructure, true)), 1); |
|
| 663 | 663 | |
| 664 | 664 | if (!empty($this->physicalStructureInfo[$this->smLinks['l2p'][$details['id']][0]]['files'][$extConf['fileGrpThumbs']])) { |
| 665 | 665 | |
@@ -712,7 +712,7 @@ discard block |
||
| 712 | 712 | foreach ($structure->children('http://www.loc.gov/METS/')->div as $child) { |
| 713 | 713 | |
| 714 | 714 | // Repeat for all children. |
| 715 | - $details['children'][] = $this->getLogicalStructureInfo($child, TRUE); |
|
| 715 | + $details['children'][] = $this->getLogicalStructureInfo($child, true); |
|
| 716 | 716 | |
| 717 | 717 | } |
| 718 | 718 | |
@@ -861,7 +861,7 @@ discard block |
||
| 861 | 861 | $result = $GLOBALS['TYPO3_DB']->exec_SELECTquery( |
| 862 | 862 | 'tx_dlf_metadata.index_name AS index_name,tx_dlf_metadataformat.xpath AS xpath,tx_dlf_metadataformat.xpath_sorting AS xpath_sorting,tx_dlf_metadata.is_sortable AS is_sortable,tx_dlf_metadata.default_value AS default_value,tx_dlf_metadata.format AS format', |
| 863 | 863 | 'tx_dlf_metadata,tx_dlf_metadataformat,tx_dlf_formats', |
| 864 | - 'tx_dlf_metadata.pid='.$cPid.' AND tx_dlf_metadataformat.pid='.$cPid.' AND ((tx_dlf_metadata.uid=tx_dlf_metadataformat.parent_id AND tx_dlf_metadataformat.encoded=tx_dlf_formats.uid AND tx_dlf_formats.type='.$GLOBALS['TYPO3_DB']->fullQuoteStr($this->dmdSec[$dmdId]['type'], 'tx_dlf_formats').') OR tx_dlf_metadata.format=0)'.tx_dlf_helper::whereClause('tx_dlf_metadata', TRUE).tx_dlf_helper::whereClause('tx_dlf_metadataformat').tx_dlf_helper::whereClause('tx_dlf_formats'), |
|
| 864 | + 'tx_dlf_metadata.pid='.$cPid.' AND tx_dlf_metadataformat.pid='.$cPid.' AND ((tx_dlf_metadata.uid=tx_dlf_metadataformat.parent_id AND tx_dlf_metadataformat.encoded=tx_dlf_formats.uid AND tx_dlf_formats.type='.$GLOBALS['TYPO3_DB']->fullQuoteStr($this->dmdSec[$dmdId]['type'], 'tx_dlf_formats').') OR tx_dlf_metadata.format=0)'.tx_dlf_helper::whereClause('tx_dlf_metadata', true).tx_dlf_helper::whereClause('tx_dlf_metadataformat').tx_dlf_helper::whereClause('tx_dlf_formats'), |
|
| 865 | 865 | '', |
| 866 | 866 | '', |
| 867 | 867 | '' |
@@ -1002,7 +1002,7 @@ discard block |
||
| 1002 | 1002 | |
| 1003 | 1003 | foreach ($this->physicalStructureInfo as $page) { |
| 1004 | 1004 | |
| 1005 | - if (strpos($page['orderlabel'], $logicalPage) !== FALSE) { |
|
| 1005 | + if (strpos($page['orderlabel'], $logicalPage) !== false) { |
|
| 1006 | 1006 | |
| 1007 | 1007 | $this->lastSearchedPhysicalPage['logicalPage'] = $logicalPage; |
| 1008 | 1008 | $this->lastSearchedPhysicalPage['physicalPage'] = $physicalPage; |
@@ -1061,10 +1061,10 @@ discard block |
||
| 1061 | 1061 | $file = $this->getFileLocation($this->physicalStructureInfo[$id]['files'][$extConf['fileGrpFulltext']]); |
| 1062 | 1062 | |
| 1063 | 1063 | // Turn off libxml's error logging. |
| 1064 | - $libxmlErrors = libxml_use_internal_errors(TRUE); |
|
| 1064 | + $libxmlErrors = libxml_use_internal_errors(true); |
|
| 1065 | 1065 | |
| 1066 | 1066 | // Disables the functionality to allow external entities to be loaded when parsing the XML, must be kept. |
| 1067 | - $previousValueOfEntityLoader = libxml_disable_entity_loader(TRUE); |
|
| 1067 | + $previousValueOfEntityLoader = libxml_disable_entity_loader(true); |
|
| 1068 | 1068 | |
| 1069 | 1069 | // Load XML from file. |
| 1070 | 1070 | $rawTextXml = simplexml_load_string(\TYPO3\CMS\Core\Utility\GeneralUtility::getUrl($file)); |
@@ -1142,7 +1142,7 @@ discard block |
||
| 1142 | 1142 | * |
| 1143 | 1143 | * @return string The title of the document itself or a parent document |
| 1144 | 1144 | */ |
| 1145 | - public static function getTitle($uid, $recursive = FALSE) { |
|
| 1145 | + public static function getTitle($uid, $recursive = false) { |
|
| 1146 | 1146 | |
| 1147 | 1147 | // Save parameter for logging purposes. |
| 1148 | 1148 | $_uid = $uid; |
@@ -1171,7 +1171,7 @@ discard block |
||
| 1171 | 1171 | // Search parent documents recursively for a title? |
| 1172 | 1172 | if ($recursive && empty($title) && intval($partof) && $partof != $uid) { |
| 1173 | 1173 | |
| 1174 | - $title = self::getTitle($partof, TRUE); |
|
| 1174 | + $title = self::getTitle($partof, true); |
|
| 1175 | 1175 | |
| 1176 | 1176 | } |
| 1177 | 1177 | |
@@ -1288,10 +1288,10 @@ discard block |
||
| 1288 | 1288 | } |
| 1289 | 1289 | |
| 1290 | 1290 | // Turn off libxml's error logging. |
| 1291 | - $libxmlErrors = libxml_use_internal_errors(TRUE); |
|
| 1291 | + $libxmlErrors = libxml_use_internal_errors(true); |
|
| 1292 | 1292 | |
| 1293 | 1293 | // Disables the functionality to allow external entities to be loaded when parsing the XML, must be kept |
| 1294 | - $previousValueOfEntityLoader = libxml_disable_entity_loader(TRUE); |
|
| 1294 | + $previousValueOfEntityLoader = libxml_disable_entity_loader(true); |
|
| 1295 | 1295 | |
| 1296 | 1296 | // Load XML from file. |
| 1297 | 1297 | $xml = simplexml_load_string(\TYPO3\CMS\Core\Utility\GeneralUtility::getUrl($location)); |
@@ -1303,11 +1303,11 @@ discard block |
||
| 1303 | 1303 | libxml_use_internal_errors($libxmlErrors); |
| 1304 | 1304 | |
| 1305 | 1305 | // Set some basic properties. |
| 1306 | - if ($xml !== FALSE) { |
|
| 1306 | + if ($xml !== false) { |
|
| 1307 | 1307 | |
| 1308 | 1308 | $this->xml = $xml; |
| 1309 | 1309 | |
| 1310 | - return TRUE; |
|
| 1310 | + return true; |
|
| 1311 | 1311 | |
| 1312 | 1312 | } else { |
| 1313 | 1313 | |
@@ -1329,7 +1329,7 @@ discard block |
||
| 1329 | 1329 | |
| 1330 | 1330 | } |
| 1331 | 1331 | |
| 1332 | - return FALSE; |
|
| 1332 | + return false; |
|
| 1333 | 1333 | |
| 1334 | 1334 | } |
| 1335 | 1335 | |
@@ -1365,7 +1365,7 @@ discard block |
||
| 1365 | 1365 | |
| 1366 | 1366 | } |
| 1367 | 1367 | |
| 1368 | - $this->formatsLoaded = TRUE; |
|
| 1368 | + $this->formatsLoaded = true; |
|
| 1369 | 1369 | |
| 1370 | 1370 | } |
| 1371 | 1371 | |
@@ -1439,7 +1439,7 @@ discard block |
||
| 1439 | 1439 | |
| 1440 | 1440 | } |
| 1441 | 1441 | |
| 1442 | - return FALSE; |
|
| 1442 | + return false; |
|
| 1443 | 1443 | |
| 1444 | 1444 | } |
| 1445 | 1445 | |
@@ -1463,7 +1463,7 @@ discard block |
||
| 1463 | 1463 | |
| 1464 | 1464 | } |
| 1465 | 1465 | |
| 1466 | - return FALSE; |
|
| 1466 | + return false; |
|
| 1467 | 1467 | |
| 1468 | 1468 | } |
| 1469 | 1469 | |
@@ -1489,7 +1489,7 @@ discard block |
||
| 1489 | 1489 | |
| 1490 | 1490 | } |
| 1491 | 1491 | |
| 1492 | - return FALSE; |
|
| 1492 | + return false; |
|
| 1493 | 1493 | |
| 1494 | 1494 | } |
| 1495 | 1495 | |
@@ -1514,7 +1514,7 @@ discard block |
||
| 1514 | 1514 | |
| 1515 | 1515 | } |
| 1516 | 1516 | |
| 1517 | - return FALSE; |
|
| 1517 | + return false; |
|
| 1518 | 1518 | |
| 1519 | 1519 | } |
| 1520 | 1520 | |
@@ -1540,7 +1540,7 @@ discard block |
||
| 1540 | 1540 | |
| 1541 | 1541 | } |
| 1542 | 1542 | |
| 1543 | - return FALSE; |
|
| 1543 | + return false; |
|
| 1544 | 1544 | |
| 1545 | 1545 | } |
| 1546 | 1546 | |
@@ -1606,9 +1606,9 @@ discard block |
||
| 1606 | 1606 | $message = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance( |
| 1607 | 1607 | 'TYPO3\\CMS\\Core\\Messaging\\FlashMessage', |
| 1608 | 1608 | htmlspecialchars(sprintf(tx_dlf_helper::getLL('flash.newCollection'), $collection, $substUid[$collNewUid])), |
| 1609 | - tx_dlf_helper::getLL('flash.attention', TRUE), |
|
| 1609 | + tx_dlf_helper::getLL('flash.attention', true), |
|
| 1610 | 1610 | \TYPO3\CMS\Core\Messaging\FlashMessage::INFO, |
| 1611 | - TRUE |
|
| 1611 | + true |
|
| 1612 | 1612 | ); |
| 1613 | 1613 | |
| 1614 | 1614 | tx_dlf_helper::addMessage($message); |
@@ -1667,9 +1667,9 @@ discard block |
||
| 1667 | 1667 | $message = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance( |
| 1668 | 1668 | 'TYPO3\\CMS\\Core\\Messaging\\FlashMessage', |
| 1669 | 1669 | htmlspecialchars(sprintf(tx_dlf_helper::getLL('flash.newLibrary'), $owner, $ownerUid)), |
| 1670 | - tx_dlf_helper::getLL('flash.attention', TRUE), |
|
| 1670 | + tx_dlf_helper::getLL('flash.attention', true), |
|
| 1671 | 1671 | \TYPO3\CMS\Core\Messaging\FlashMessage::INFO, |
| 1672 | - TRUE |
|
| 1672 | + true |
|
| 1673 | 1673 | ); |
| 1674 | 1674 | |
| 1675 | 1675 | tx_dlf_helper::addMessage($message); |
@@ -1796,7 +1796,7 @@ discard block |
||
| 1796 | 1796 | 'author' => implode('; ', $metadata['author']), |
| 1797 | 1797 | 'year' => implode('; ', $metadata['year']), |
| 1798 | 1798 | 'place' => implode('; ', $metadata['place']), |
| 1799 | - 'thumbnail' => $this->_getThumbnail(TRUE), |
|
| 1799 | + 'thumbnail' => $this->_getThumbnail(true), |
|
| 1800 | 1800 | 'metadata' => serialize($listed), |
| 1801 | 1801 | 'metadata_sorting' => serialize($sortable), |
| 1802 | 1802 | 'structure' => $metadata['type'][0], |
@@ -1837,9 +1837,9 @@ discard block |
||
| 1837 | 1837 | $message = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance( |
| 1838 | 1838 | 'TYPO3\\CMS\\Core\\Messaging\\FlashMessage', |
| 1839 | 1839 | htmlspecialchars(sprintf(tx_dlf_helper::getLL('flash.documentSaved'), $metadata['title'][0], $this->uid)), |
| 1840 | - tx_dlf_helper::getLL('flash.done', TRUE), |
|
| 1840 | + tx_dlf_helper::getLL('flash.done', true), |
|
| 1841 | 1841 | \TYPO3\CMS\Core\Messaging\FlashMessage::OK, |
| 1842 | - TRUE |
|
| 1842 | + true |
|
| 1843 | 1843 | ); |
| 1844 | 1844 | |
| 1845 | 1845 | tx_dlf_helper::addMessage($message); |
@@ -1861,7 +1861,7 @@ discard block |
||
| 1861 | 1861 | |
| 1862 | 1862 | } |
| 1863 | 1863 | |
| 1864 | - return TRUE; |
|
| 1864 | + return true; |
|
| 1865 | 1865 | |
| 1866 | 1866 | } |
| 1867 | 1867 | |
@@ -1931,7 +1931,7 @@ discard block |
||
| 1931 | 1931 | |
| 1932 | 1932 | } |
| 1933 | 1933 | |
| 1934 | - $this->dmdSecLoaded = TRUE; |
|
| 1934 | + $this->dmdSecLoaded = true; |
|
| 1935 | 1935 | |
| 1936 | 1936 | } |
| 1937 | 1937 | |
@@ -2002,11 +2002,11 @@ discard block |
||
| 2002 | 2002 | |
| 2003 | 2003 | $fft = $this->mets->xpath("./mets:fileSec/mets:fileGrp[@USE='FULLTEXT']/mets:file[1]"); |
| 2004 | 2004 | $this->mimetypeFulltext = $fft[0]->attributes()->MIMETYPE; |
| 2005 | - $this->hasFulltext = TRUE; |
|
| 2005 | + $this->hasFulltext = true; |
|
| 2006 | 2006 | |
| 2007 | 2007 | } |
| 2008 | 2008 | |
| 2009 | - $this->fileGrpsLoaded = TRUE; |
|
| 2009 | + $this->fileGrpsLoaded = true; |
|
| 2010 | 2010 | |
| 2011 | 2011 | } |
| 2012 | 2012 | |
@@ -2087,7 +2087,7 @@ discard block |
||
| 2087 | 2087 | // Set current PID for metadata definitions. |
| 2088 | 2088 | $this->metadataArray[0] = $cPid; |
| 2089 | 2089 | |
| 2090 | - $this->metadataArrayLoaded = TRUE; |
|
| 2090 | + $this->metadataArrayLoaded = true; |
|
| 2091 | 2091 | |
| 2092 | 2092 | } |
| 2093 | 2093 | |
@@ -2233,7 +2233,7 @@ discard block |
||
| 2233 | 2233 | |
| 2234 | 2234 | } |
| 2235 | 2235 | |
| 2236 | - $this->physicalStructureLoaded = TRUE; |
|
| 2236 | + $this->physicalStructureLoaded = true; |
|
| 2237 | 2237 | |
| 2238 | 2238 | } |
| 2239 | 2239 | |
@@ -2320,7 +2320,7 @@ discard block |
||
| 2320 | 2320 | |
| 2321 | 2321 | } |
| 2322 | 2322 | |
| 2323 | - $this->rootIdLoaded = TRUE; |
|
| 2323 | + $this->rootIdLoaded = true; |
|
| 2324 | 2324 | |
| 2325 | 2325 | } |
| 2326 | 2326 | |
@@ -2349,7 +2349,7 @@ discard block |
||
| 2349 | 2349 | |
| 2350 | 2350 | } |
| 2351 | 2351 | |
| 2352 | - $this->smLinksLoaded = TRUE; |
|
| 2352 | + $this->smLinksLoaded = true; |
|
| 2353 | 2353 | |
| 2354 | 2354 | } |
| 2355 | 2355 | |
@@ -2370,9 +2370,9 @@ discard block |
||
| 2370 | 2370 | if (!$this->tableOfContentsLoaded) { |
| 2371 | 2371 | |
| 2372 | 2372 | // Get all logical structures. |
| 2373 | - $this->getLogicalStructure('', TRUE); |
|
| 2373 | + $this->getLogicalStructure('', true); |
|
| 2374 | 2374 | |
| 2375 | - $this->tableOfContentsLoaded = TRUE; |
|
| 2375 | + $this->tableOfContentsLoaded = true; |
|
| 2376 | 2376 | |
| 2377 | 2377 | } |
| 2378 | 2378 | |
@@ -2389,7 +2389,7 @@ discard block |
||
| 2389 | 2389 | * |
| 2390 | 2390 | * @return string The document's thumbnail location |
| 2391 | 2391 | */ |
| 2392 | - protected function _getThumbnail($forceReload = FALSE) { |
|
| 2392 | + protected function _getThumbnail($forceReload = false) { |
|
| 2393 | 2393 | |
| 2394 | 2394 | if (!$this->thumbnailLoaded || $forceReload) { |
| 2395 | 2395 | |
@@ -2404,7 +2404,7 @@ discard block |
||
| 2404 | 2404 | |
| 2405 | 2405 | } |
| 2406 | 2406 | |
| 2407 | - $this->thumbnailLoaded = TRUE; |
|
| 2407 | + $this->thumbnailLoaded = true; |
|
| 2408 | 2408 | |
| 2409 | 2409 | return $this->thumbnail; |
| 2410 | 2410 | |
@@ -2421,7 +2421,7 @@ discard block |
||
| 2421 | 2421 | |
| 2422 | 2422 | } |
| 2423 | 2423 | |
| 2424 | - $this->thumbnailLoaded = TRUE; |
|
| 2424 | + $this->thumbnailLoaded = true; |
|
| 2425 | 2425 | |
| 2426 | 2426 | return $this->thumbnail; |
| 2427 | 2427 | |
@@ -2481,7 +2481,7 @@ discard block |
||
| 2481 | 2481 | |
| 2482 | 2482 | } |
| 2483 | 2483 | |
| 2484 | - $this->thumbnailLoaded = TRUE; |
|
| 2484 | + $this->thumbnailLoaded = true; |
|
| 2485 | 2485 | |
| 2486 | 2486 | } |
| 2487 | 2487 | |
@@ -2599,7 +2599,7 @@ discard block |
||
| 2599 | 2599 | // Initialize core METS object. |
| 2600 | 2600 | $this->init(); |
| 2601 | 2601 | |
| 2602 | - if ($this->mets !== NULL) { |
|
| 2602 | + if ($this->mets !== null) { |
|
| 2603 | 2603 | |
| 2604 | 2604 | // Cast to string for safety reasons. |
| 2605 | 2605 | $location = (string) $uid; |
@@ -2674,10 +2674,10 @@ discard block |
||
| 2674 | 2674 | |
| 2675 | 2675 | list ($this->uid, $this->pid, $this->recordId, $this->parentId, $this->thumbnail, $this->location) = $GLOBALS['TYPO3_DB']->sql_fetch_row($result); |
| 2676 | 2676 | |
| 2677 | - $this->thumbnailLoaded = TRUE; |
|
| 2677 | + $this->thumbnailLoaded = true; |
|
| 2678 | 2678 | |
| 2679 | 2679 | // Load XML file if necessary... |
| 2680 | - if ($this->mets === NULL && $this->load($this->location)) { |
|
| 2680 | + if ($this->mets === null && $this->load($this->location)) { |
|
| 2681 | 2681 | |
| 2682 | 2682 | // ...and set some basic properties. |
| 2683 | 2683 | $this->init(); |
@@ -2685,7 +2685,7 @@ discard block |
||
| 2685 | 2685 | } |
| 2686 | 2686 | |
| 2687 | 2687 | // Do we have a METS object now? |
| 2688 | - if ($this->mets !== NULL) { |
|
| 2688 | + if ($this->mets !== null) { |
|
| 2689 | 2689 | |
| 2690 | 2690 | // Set new location if necessary. |
| 2691 | 2691 | if (!empty($location)) { |
@@ -2695,11 +2695,11 @@ discard block |
||
| 2695 | 2695 | } |
| 2696 | 2696 | |
| 2697 | 2697 | // Document ready! |
| 2698 | - $this->ready = TRUE; |
|
| 2698 | + $this->ready = true; |
|
| 2699 | 2699 | |
| 2700 | 2700 | } |
| 2701 | 2701 | |
| 2702 | - } elseif ($this->mets !== NULL) { |
|
| 2702 | + } elseif ($this->mets !== null) { |
|
| 2703 | 2703 | |
| 2704 | 2704 | // Set location as UID for documents not in database. |
| 2705 | 2705 | $this->uid = $location; |
@@ -2707,7 +2707,7 @@ discard block |
||
| 2707 | 2707 | $this->location = $location; |
| 2708 | 2708 | |
| 2709 | 2709 | // Document ready! |
| 2710 | - $this->ready = TRUE; |
|
| 2710 | + $this->ready = true; |
|
| 2711 | 2711 | |
| 2712 | 2712 | } else { |
| 2713 | 2713 | |
@@ -2810,9 +2810,9 @@ discard block |
||
| 2810 | 2810 | |
| 2811 | 2811 | $xml = new DOMDocument('1.0', 'utf-8'); |
| 2812 | 2812 | |
| 2813 | - $xml->appendChild($xml->importNode(dom_import_simplexml($this->mets), TRUE)); |
|
| 2813 | + $xml->appendChild($xml->importNode(dom_import_simplexml($this->mets), true)); |
|
| 2814 | 2814 | |
| 2815 | - $xml->formatOutput = TRUE; |
|
| 2815 | + $xml->formatOutput = true; |
|
| 2816 | 2816 | |
| 2817 | 2817 | return $xml->saveXML(); |
| 2818 | 2818 | |
@@ -2829,7 +2829,7 @@ discard block |
||
| 2829 | 2829 | public function __wakeup() { |
| 2830 | 2830 | |
| 2831 | 2831 | // Turn off libxml's error logging. |
| 2832 | - $libxmlErrors = libxml_use_internal_errors(TRUE); |
|
| 2832 | + $libxmlErrors = libxml_use_internal_errors(true); |
|
| 2833 | 2833 | |
| 2834 | 2834 | // Reload XML from string. |
| 2835 | 2835 | $xml = @simplexml_load_string($this->asXML); |
@@ -2837,7 +2837,7 @@ discard block |
||
| 2837 | 2837 | // Reset libxml's error logging. |
| 2838 | 2838 | libxml_use_internal_errors($libxmlErrors); |
| 2839 | 2839 | |
| 2840 | - if ($xml !== FALSE) { |
|
| 2840 | + if ($xml !== false) { |
|
| 2841 | 2841 | |
| 2842 | 2842 | $this->asXML = ''; |
| 2843 | 2843 | |