@@ -55,12 +55,12 @@ discard block |
||
| 55 | 55 | */ |
| 56 | 56 | protected function getMetadataConfig() { |
| 57 | 57 | |
| 58 | - $uids = array (); |
|
| 58 | + $uids = array(); |
|
| 59 | 59 | |
| 60 | 60 | // check if tx_dlf_metadata.xpath exists anyhow |
| 61 | 61 | $fieldsInDatabase = $GLOBALS['TYPO3_DB']->admin_get_fields('tx_dlf_metadata'); |
| 62 | 62 | |
| 63 | - if (! in_array('xpath', array_keys($fieldsInDatabase))) { |
|
| 63 | + if (!in_array('xpath', array_keys($fieldsInDatabase))) { |
|
| 64 | 64 | |
| 65 | 65 | return $uids; |
| 66 | 66 | |
@@ -122,7 +122,7 @@ discard block |
||
| 122 | 122 | |
| 123 | 123 | if (!empty($metadataUids)) { |
| 124 | 124 | |
| 125 | - $data = array (); |
|
| 125 | + $data = array(); |
|
| 126 | 126 | |
| 127 | 127 | // Get all old metadata configuration records. |
| 128 | 128 | $result = $GLOBALS['TYPO3_DB']->exec_SELECTquery( |
@@ -139,7 +139,7 @@ discard block |
||
| 139 | 139 | $newId = uniqid('NEW'); |
| 140 | 140 | |
| 141 | 141 | // Copy record to new table. |
| 142 | - $data['tx_dlf_metadataformat'][$newId] = array ( |
|
| 142 | + $data['tx_dlf_metadataformat'][$newId] = array( |
|
| 143 | 143 | 'pid' => $resArray['pid'], |
| 144 | 144 | 'cruser_id' => $resArray['cruser_id'], |
| 145 | 145 | 'parent_id' => $resArray['uid'], |
@@ -9,7 +9,7 @@ discard block |
||
| 9 | 9 | * LICENSE.txt file that was distributed with this source code. |
| 10 | 10 | */ |
| 11 | 11 | |
| 12 | -if (!defined ('TYPO3_MODE')) die ('Access denied.'); |
|
| 12 | +if (!defined('TYPO3_MODE')) die ('Access denied.'); |
|
| 13 | 13 | |
| 14 | 14 | // Register static typoscript. |
| 15 | 15 | \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addStaticFile($_EXTKEY, 'Configuration/TypoScript/', 'Basic Configuration'); |
@@ -163,16 +163,16 @@ discard block |
||
| 163 | 163 | \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue($_EXTKEY.'_validator', 'FILE:EXT:'.$_EXTKEY.'/plugins/validator/flexform.xml'); |
| 164 | 164 | |
| 165 | 165 | // Register modules. |
| 166 | -if (TYPO3_MODE == 'BE') { |
|
| 166 | +if (TYPO3_MODE == 'BE') { |
|
| 167 | 167 | |
| 168 | 168 | // Add modules after "web". |
| 169 | - if (!isset($TBE_MODULES['txdlfmodules'])) { |
|
| 169 | + if (!isset($TBE_MODULES['txdlfmodules'])) { |
|
| 170 | 170 | |
| 171 | 171 | $modules = array(); |
| 172 | 172 | |
| 173 | - foreach($TBE_MODULES as $key => $val) { |
|
| 173 | + foreach ($TBE_MODULES as $key => $val) { |
|
| 174 | 174 | |
| 175 | - if ($key == 'web') { |
|
| 175 | + if ($key == 'web') { |
|
| 176 | 176 | |
| 177 | 177 | $modules[$key] = $val; |
| 178 | 178 | |
@@ -200,11 +200,11 @@ discard block |
||
| 200 | 200 | // Module "indexing". |
| 201 | 201 | \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addModule('txdlfmodules', 'txdlfindexing', '', \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath($_EXTKEY).'modules/indexing/'); |
| 202 | 202 | |
| 203 | - \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addLLrefForTCAdescr('_MOD_txdlfmodules_txdlfindexing','EXT:dlf/modules/indexing/locallang_mod.xml'); |
|
| 203 | + \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addLLrefForTCAdescr('_MOD_txdlfmodules_txdlfindexing', 'EXT:dlf/modules/indexing/locallang_mod.xml'); |
|
| 204 | 204 | |
| 205 | 205 | // Module "newclient". |
| 206 | 206 | \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addModule('txdlfmodules', 'txdlfnewclient', '', \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath($_EXTKEY).'modules/newclient/'); |
| 207 | 207 | |
| 208 | - \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addLLrefForTCAdescr('_MOD_txdlfmodules_txdlfnewclient','EXT:dlf/modules/newclient/locallang_mod.xml'); |
|
| 208 | + \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addLLrefForTCAdescr('_MOD_txdlfmodules_txdlfnewclient', 'EXT:dlf/modules/newclient/locallang_mod.xml'); |
|
| 209 | 209 | |
| 210 | 210 | } |
@@ -35,7 +35,7 @@ discard block |
||
| 35 | 35 | * @var array() |
| 36 | 36 | * @access protected |
| 37 | 37 | */ |
| 38 | - protected $elements = array (); |
|
| 38 | + protected $elements = array(); |
|
| 39 | 39 | |
| 40 | 40 | /** |
| 41 | 41 | * This holds the list's metadata |
@@ -43,7 +43,7 @@ discard block |
||
| 43 | 43 | * @var array |
| 44 | 44 | * @access protected |
| 45 | 45 | */ |
| 46 | - protected $metadata = array (); |
|
| 46 | + protected $metadata = array(); |
|
| 47 | 47 | |
| 48 | 48 | /** |
| 49 | 49 | * This holds the current list position |
@@ -60,7 +60,7 @@ discard block |
||
| 60 | 60 | * @var array() |
| 61 | 61 | * @access protected |
| 62 | 62 | */ |
| 63 | - protected $records = array (); |
|
| 63 | + protected $records = array(); |
|
| 64 | 64 | |
| 65 | 65 | /** |
| 66 | 66 | * Instance of Apache_Solr_Service class |
@@ -76,7 +76,7 @@ discard block |
||
| 76 | 76 | * @var array |
| 77 | 77 | * @access protected |
| 78 | 78 | */ |
| 79 | - protected $solrConfig = array (); |
|
| 79 | + protected $solrConfig = array(); |
|
| 80 | 80 | |
| 81 | 81 | /** |
| 82 | 82 | * This adds an array of elements at the given position to the list |
@@ -155,7 +155,7 @@ discard block |
||
| 155 | 155 | */ |
| 156 | 156 | protected function getRecord($element) { |
| 157 | 157 | |
| 158 | - if (is_array($element) && array_keys($element) == array ('u', 'h', 's', 'p')) { |
|
| 158 | + if (is_array($element) && array_keys($element) == array('u', 'h', 's', 'p')) { |
|
| 159 | 159 | |
| 160 | 160 | // Return already processed record if possible. |
| 161 | 161 | if (!empty($this->records[$element['u']])) { |
@@ -164,7 +164,7 @@ discard block |
||
| 164 | 164 | |
| 165 | 165 | } |
| 166 | 166 | |
| 167 | - $record = array ( |
|
| 167 | + $record = array( |
|
| 168 | 168 | 'uid' => $element['u'], |
| 169 | 169 | 'page' => 1, |
| 170 | 170 | 'preview' => '', |
@@ -225,7 +225,7 @@ discard block |
||
| 225 | 225 | |
| 226 | 226 | } elseif (($key = tx_dlf_helper::array_search_recursive($resArray['uid'], $record['subparts'], TRUE)) !== FALSE) { |
| 227 | 227 | |
| 228 | - $record['subparts'][$key] = array ( |
|
| 228 | + $record['subparts'][$key] = array( |
|
| 229 | 229 | 'uid' => $resArray['uid'], |
| 230 | 230 | 'page' => 1, |
| 231 | 231 | 'preview' => (!empty($record['subparts'][$key]['h']) ? $record['subparts'][$key]['h'] : ''), |
@@ -248,13 +248,13 @@ discard block |
||
| 248 | 248 | foreach ($result->response->docs as $resArray) { |
| 249 | 249 | |
| 250 | 250 | // Prepare document's metadata. |
| 251 | - $metadata = array (); |
|
| 251 | + $metadata = array(); |
|
| 252 | 252 | |
| 253 | 253 | foreach ($this->solrConfig as $index_name => $solr_name) { |
| 254 | 254 | |
| 255 | 255 | if (!empty($resArray->$solr_name)) { |
| 256 | 256 | |
| 257 | - $metadata[$index_name] = (is_array($resArray->$solr_name) ? $resArray->$solr_name : array ($resArray->$solr_name)); |
|
| 257 | + $metadata[$index_name] = (is_array($resArray->$solr_name) ? $resArray->$solr_name : array($resArray->$solr_name)); |
|
| 258 | 258 | |
| 259 | 259 | } |
| 260 | 260 | |
@@ -269,7 +269,7 @@ discard block |
||
| 269 | 269 | |
| 270 | 270 | } elseif (($key = tx_dlf_helper::array_search_recursive($resArray->id, $record['subparts'], TRUE)) !== FALSE) { |
| 271 | 271 | |
| 272 | - $record['subparts'][$key] = array ( |
|
| 272 | + $record['subparts'][$key] = array( |
|
| 273 | 273 | 'uid' => $resArray->uid, |
| 274 | 274 | 'page' => $resArray->page, |
| 275 | 275 | 'preview' => (!empty($record['subparts'][$key]['h']) ? $record['subparts'][$key]['h'] : ''), |
@@ -369,7 +369,7 @@ discard block |
||
| 369 | 369 | |
| 370 | 370 | $element = $this->remove($position); |
| 371 | 371 | |
| 372 | - $this->add(array ($element), $position + $steps); |
|
| 372 | + $this->add(array($element), $position + $steps); |
|
| 373 | 373 | |
| 374 | 374 | } |
| 375 | 375 | |
@@ -573,11 +573,11 @@ discard block |
||
| 573 | 573 | */ |
| 574 | 574 | public function reset() { |
| 575 | 575 | |
| 576 | - $this->elements = array (); |
|
| 576 | + $this->elements = array(); |
|
| 577 | 577 | |
| 578 | - $this->records = array (); |
|
| 578 | + $this->records = array(); |
|
| 579 | 579 | |
| 580 | - $this->metadata = array (); |
|
| 580 | + $this->metadata = array(); |
|
| 581 | 581 | |
| 582 | 582 | $this->count = 0; |
| 583 | 583 | |
@@ -619,7 +619,7 @@ discard block |
||
| 619 | 619 | |
| 620 | 620 | } else { |
| 621 | 621 | |
| 622 | - tx_dlf_helper::saveToSession(array ($this->elements, $this->metadata), get_class($this)); |
|
| 622 | + tx_dlf_helper::saveToSession(array($this->elements, $this->metadata), get_class($this)); |
|
| 623 | 623 | |
| 624 | 624 | } |
| 625 | 625 | |
@@ -683,9 +683,9 @@ discard block |
||
| 683 | 683 | */ |
| 684 | 684 | public function sort($by, $asc = TRUE) { |
| 685 | 685 | |
| 686 | - $newOrder = array (); |
|
| 686 | + $newOrder = array(); |
|
| 687 | 687 | |
| 688 | - $nonSortable = array (); |
|
| 688 | + $nonSortable = array(); |
|
| 689 | 689 | |
| 690 | 690 | foreach ($this->elements as $num => $element) { |
| 691 | 691 | |
@@ -790,7 +790,7 @@ discard block |
||
| 790 | 790 | * |
| 791 | 791 | * @return void |
| 792 | 792 | */ |
| 793 | - protected function _setMetadata(array $metadata = array ()) { |
|
| 793 | + protected function _setMetadata(array $metadata = array()) { |
|
| 794 | 794 | |
| 795 | 795 | $this->metadata = $metadata; |
| 796 | 796 | |
@@ -806,7 +806,7 @@ discard block |
||
| 806 | 806 | * |
| 807 | 807 | * @return void |
| 808 | 808 | */ |
| 809 | - public function __construct(array $elements = array (), array $metadata = array ()) { |
|
| 809 | + public function __construct(array $elements = array(), array $metadata = array()) { |
|
| 810 | 810 | |
| 811 | 811 | if (empty($elements) && empty($metadata)) { |
| 812 | 812 | |
@@ -925,7 +925,7 @@ discard block |
||
| 925 | 925 | */ |
| 926 | 926 | public function __sleep() { |
| 927 | 927 | |
| 928 | - return array ('elements', 'metadata'); |
|
| 928 | + return array('elements', 'metadata'); |
|
| 929 | 929 | |
| 930 | 930 | } |
| 931 | 931 | |
@@ -34,7 +34,7 @@ discard block |
||
| 34 | 34 | * @var array |
| 35 | 35 | * @access protected |
| 36 | 36 | */ |
| 37 | - protected static $locallang = array (); |
|
| 37 | + protected static $locallang = array(); |
|
| 38 | 38 | |
| 39 | 39 | /** |
| 40 | 40 | * Adds a message to the message queue. |
@@ -349,7 +349,7 @@ discard block |
||
| 349 | 349 | |
| 350 | 350 | $hash = $salt.substr(sha1($salt.$string), -10); |
| 351 | 351 | |
| 352 | - return array ('encrypted' => $encrypted, 'hash' => $hash); |
|
| 352 | + return array('encrypted' => $encrypted, 'hash' => $hash); |
|
| 353 | 353 | |
| 354 | 354 | } |
| 355 | 355 | |
@@ -438,7 +438,7 @@ discard block |
||
| 438 | 438 | */ |
| 439 | 439 | public static function getHookObjects($scriptRelPath) { |
| 440 | 440 | |
| 441 | - $hookObjects = array (); |
|
| 441 | + $hookObjects = array(); |
|
| 442 | 442 | |
| 443 | 443 | if (is_array($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS'][self::$extKey.'/'.$scriptRelPath]['hookClass'])) { |
| 444 | 444 | |
@@ -475,7 +475,7 @@ discard block |
||
| 475 | 475 | // Sanitize input. |
| 476 | 476 | $uid = max(intval($uid), 0); |
| 477 | 477 | |
| 478 | - if (!$uid || !in_array($table, array ('tx_dlf_collections', 'tx_dlf_libraries', 'tx_dlf_metadata', 'tx_dlf_structures', 'tx_dlf_solrcores'))) { |
|
| 478 | + if (!$uid || !in_array($table, array('tx_dlf_collections', 'tx_dlf_libraries', 'tx_dlf_metadata', 'tx_dlf_structures', 'tx_dlf_solrcores'))) { |
|
| 479 | 479 | |
| 480 | 480 | if (TYPO3_DLOG) { |
| 481 | 481 | |
@@ -546,7 +546,7 @@ discard block |
||
| 546 | 546 | |
| 547 | 547 | $_pid = $pid; |
| 548 | 548 | |
| 549 | - if (!$index_name || !in_array($table, array ('tx_dlf_collections', 'tx_dlf_libraries', 'tx_dlf_metadata', 'tx_dlf_structures', 'tx_dlf_solrcores'))) { |
|
| 549 | + if (!$index_name || !in_array($table, array('tx_dlf_collections', 'tx_dlf_libraries', 'tx_dlf_metadata', 'tx_dlf_structures', 'tx_dlf_solrcores'))) { |
|
| 550 | 550 | |
| 551 | 551 | if (TYPO3_DLOG) { |
| 552 | 552 | |
@@ -757,7 +757,7 @@ discard block |
||
| 757 | 757 | */ |
| 758 | 758 | public static function getURN($base, $id) { |
| 759 | 759 | |
| 760 | - $concordance = array ( |
|
| 760 | + $concordance = array( |
|
| 761 | 761 | '0' => 1, |
| 762 | 762 | '1' => 2, |
| 763 | 763 | '2' => 3, |
@@ -913,7 +913,7 @@ discard block |
||
| 913 | 913 | * |
| 914 | 914 | * @return array Array of substituted "NEW..." identifiers and their actual UIDs. |
| 915 | 915 | */ |
| 916 | - public static function processDB(array $data = array (), array $cmd = array (), $reverseOrder = FALSE, $be_user = FALSE) { |
|
| 916 | + public static function processDB(array $data = array(), array $cmd = array(), $reverseOrder = FALSE, $be_user = FALSE) { |
|
| 917 | 917 | |
| 918 | 918 | // Instantiate TYPO3 core engine. |
| 919 | 919 | $tce = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\DataHandling\\DataHandler'); |
@@ -971,7 +971,7 @@ discard block |
||
| 971 | 971 | * |
| 972 | 972 | * @return array Array of substituted "NEW..." identifiers and their actual UIDs. |
| 973 | 973 | */ |
| 974 | - public static function processDBasAdmin(array $data = array (), array $cmd = array (), $reverseOrder = FALSE) { |
|
| 974 | + public static function processDBasAdmin(array $data = array(), array $cmd = array(), $reverseOrder = FALSE) { |
|
| 975 | 975 | |
| 976 | 976 | if (TYPO3_MODE === 'BE' && $GLOBALS['BE_USER']->isAdmin()) { |
| 977 | 977 | |
@@ -981,11 +981,11 @@ discard block |
||
| 981 | 981 | |
| 982 | 982 | if (TYPO3_DLOG) { |
| 983 | 983 | |
| 984 | - \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('[tx_dlf_helper->processDBasAdmin([data->data], [data->cmd], ['.($reverseOrder ? 'TRUE' : 'FALSE').'])] Current backend user has no admin privileges', self::$extKey, SYSLOG_SEVERITY_ERROR, array ('data' => $data, 'cmd' => $cmd)); |
|
| 984 | + \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('[tx_dlf_helper->processDBasAdmin([data->data], [data->cmd], ['.($reverseOrder ? 'TRUE' : 'FALSE').'])] Current backend user has no admin privileges', self::$extKey, SYSLOG_SEVERITY_ERROR, array('data' => $data, 'cmd' => $cmd)); |
|
| 985 | 985 | |
| 986 | 986 | } |
| 987 | 987 | |
| 988 | - return array (); |
|
| 988 | + return array(); |
|
| 989 | 989 | |
| 990 | 990 | } |
| 991 | 991 | |
@@ -1028,7 +1028,7 @@ discard block |
||
| 1028 | 1028 | |
| 1029 | 1029 | if ($flashMessage->getTitle() !== '') { |
| 1030 | 1030 | |
| 1031 | - $messageContent = sprintf('<h4>%s</h4>', htmlspecialchars($flashMessage->getTitle())) . $messageContent; |
|
| 1031 | + $messageContent = sprintf('<h4>%s</h4>', htmlspecialchars($flashMessage->getTitle())).$messageContent; |
|
| 1032 | 1032 | |
| 1033 | 1033 | } |
| 1034 | 1034 | |
@@ -1124,7 +1124,7 @@ discard block |
||
| 1124 | 1124 | $_pid = $pid; |
| 1125 | 1125 | |
| 1126 | 1126 | // Load labels into static variable for future use. |
| 1127 | - static $labels = array (); |
|
| 1127 | + static $labels = array(); |
|
| 1128 | 1128 | |
| 1129 | 1129 | // Sanitize input. |
| 1130 | 1130 | $pid = max(intval($pid), 0); |
@@ -1191,7 +1191,7 @@ discard block |
||
| 1191 | 1191 | if (empty($labels[$table][$pid][$GLOBALS['TSFE']->sys_language_content][$index_name])) { |
| 1192 | 1192 | |
| 1193 | 1193 | // Check if this table is allowed for translation. |
| 1194 | - if (in_array($table, array ('tx_dlf_collections', 'tx_dlf_libraries', 'tx_dlf_metadata', 'tx_dlf_structures'))) { |
|
| 1194 | + if (in_array($table, array('tx_dlf_collections', 'tx_dlf_libraries', 'tx_dlf_metadata', 'tx_dlf_structures'))) { |
|
| 1195 | 1195 | |
| 1196 | 1196 | $additionalWhere = ' AND sys_language_uid IN (-1,0)'; |
| 1197 | 1197 | |
@@ -1218,7 +1218,7 @@ discard block |
||
| 1218 | 1218 | // Overlay localized labels if available. |
| 1219 | 1219 | if ($GLOBALS['TSFE']->sys_language_content > 0) { |
| 1220 | 1220 | |
| 1221 | - $resArray = $GLOBALS['TSFE']->sys_page->getRecordOverlay($table, $resArray,$GLOBALS['TSFE']->sys_language_content, $GLOBALS['TSFE']->sys_language_contentOL); |
|
| 1221 | + $resArray = $GLOBALS['TSFE']->sys_page->getRecordOverlay($table, $resArray, $GLOBALS['TSFE']->sys_language_content, $GLOBALS['TSFE']->sys_language_contentOL); |
|
| 1222 | 1222 | |
| 1223 | 1223 | } |
| 1224 | 1224 | |
@@ -43,7 +43,7 @@ discard block |
||
| 43 | 43 | * @var array |
| 44 | 44 | * @access protected |
| 45 | 45 | */ |
| 46 | - protected $dmdSec = array (); |
|
| 46 | + protected $dmdSec = array(); |
|
| 47 | 47 | |
| 48 | 48 | /** |
| 49 | 49 | * Are the METS file's dmdSecs loaded? |
@@ -69,7 +69,7 @@ discard block |
||
| 69 | 69 | * @var array |
| 70 | 70 | * @access protected |
| 71 | 71 | */ |
| 72 | - protected $fileGrps = array (); |
|
| 72 | + protected $fileGrps = array(); |
|
| 73 | 73 | |
| 74 | 74 | /** |
| 75 | 75 | * Are the file groups loaded? |
@@ -87,12 +87,12 @@ discard block |
||
| 87 | 87 | * @var array |
| 88 | 88 | * @access protected |
| 89 | 89 | */ |
| 90 | - protected $formats = array ( |
|
| 91 | - 'METS' => array ( |
|
| 90 | + protected $formats = array( |
|
| 91 | + 'METS' => array( |
|
| 92 | 92 | 'rootElement' => 'mets', |
| 93 | 93 | 'namespaceURI' => 'http://www.loc.gov/METS/', |
| 94 | 94 | ), |
| 95 | - 'XLINK' => array ( |
|
| 95 | + 'XLINK' => array( |
|
| 96 | 96 | 'rootElement' => 'xlink', |
| 97 | 97 | 'namespaceURI' => 'http://www.w3.org/1999/xlink', |
| 98 | 98 | ) |
@@ -129,7 +129,7 @@ discard block |
||
| 129 | 129 | * @var array |
| 130 | 130 | * @access protected |
| 131 | 131 | */ |
| 132 | - protected $logicalUnits = array (); |
|
| 132 | + protected $logicalUnits = array(); |
|
| 133 | 133 | |
| 134 | 134 | /** |
| 135 | 135 | * This holds the documents' parsed metadata array with their corresponding structMap//div's ID as array key |
@@ -137,7 +137,7 @@ discard block |
||
| 137 | 137 | * @var array |
| 138 | 138 | * @access protected |
| 139 | 139 | */ |
| 140 | - protected $metadataArray = array (); |
|
| 140 | + protected $metadataArray = array(); |
|
| 141 | 141 | |
| 142 | 142 | /** |
| 143 | 143 | * Is the metadata array loaded? |
@@ -178,7 +178,7 @@ discard block |
||
| 178 | 178 | * @var array |
| 179 | 179 | * @access protected |
| 180 | 180 | */ |
| 181 | - protected $physicalStructure = array (); |
|
| 181 | + protected $physicalStructure = array(); |
|
| 182 | 182 | |
| 183 | 183 | /** |
| 184 | 184 | * This holds the physical structure metadata |
@@ -186,7 +186,7 @@ discard block |
||
| 186 | 186 | * @var array |
| 187 | 187 | * @access protected |
| 188 | 188 | */ |
| 189 | - protected $physicalStructureInfo = array (); |
|
| 189 | + protected $physicalStructureInfo = array(); |
|
| 190 | 190 | |
| 191 | 191 | /** |
| 192 | 192 | * Is the physical structure loaded? |
@@ -227,7 +227,7 @@ discard block |
||
| 227 | 227 | * @var array (tx_dlf_document) |
| 228 | 228 | * @access protected |
| 229 | 229 | */ |
| 230 | - protected static $registry = array (); |
|
| 230 | + protected static $registry = array(); |
|
| 231 | 231 | |
| 232 | 232 | /** |
| 233 | 233 | * This holds the UID of the root document or zero if not multi-volumed |
@@ -252,7 +252,7 @@ discard block |
||
| 252 | 252 | * @var array |
| 253 | 253 | * @access protected |
| 254 | 254 | */ |
| 255 | - protected $smLinks = array ('l2p' => array (), 'p2l' => array ()); |
|
| 255 | + protected $smLinks = array('l2p' => array(), 'p2l' => array()); |
|
| 256 | 256 | |
| 257 | 257 | /** |
| 258 | 258 | * Are the smLinks loaded? |
@@ -269,7 +269,7 @@ discard block |
||
| 269 | 269 | * @var array |
| 270 | 270 | * @access protected |
| 271 | 271 | */ |
| 272 | - protected $tableOfContents = array (); |
|
| 272 | + protected $tableOfContents = array(); |
|
| 273 | 273 | |
| 274 | 274 | /** |
| 275 | 275 | * Is the table of contents loaded? |
@@ -331,7 +331,7 @@ discard block |
||
| 331 | 331 | public static function clearRegistry() { |
| 332 | 332 | |
| 333 | 333 | // Reset registry array. |
| 334 | - self::$registry = array (); |
|
| 334 | + self::$registry = array(); |
|
| 335 | 335 | |
| 336 | 336 | } |
| 337 | 337 | |
@@ -489,7 +489,7 @@ discard block |
||
| 489 | 489 | */ |
| 490 | 490 | public function getLogicalStructure($id, $recursive = FALSE) { |
| 491 | 491 | |
| 492 | - $details = array (); |
|
| 492 | + $details = array(); |
|
| 493 | 493 | |
| 494 | 494 | // Is the requested logical unit already loaded? |
| 495 | 495 | if (!$recursive && !empty($this->logicalUnits[$id])) { |
@@ -556,11 +556,11 @@ discard block |
||
| 556 | 556 | $extConf = unserialize($GLOBALS['TYPO3_CONF_VARS']['EXT']['extConf'][self::$extKey]); |
| 557 | 557 | |
| 558 | 558 | // Extract identity information. |
| 559 | - $details = array (); |
|
| 559 | + $details = array(); |
|
| 560 | 560 | |
| 561 | 561 | $details['id'] = $attributes['ID']; |
| 562 | 562 | |
| 563 | - $details['dmdId'] = (isset($attributes['DMDID']) ? $attributes['DMDID'] : ''); |
|
| 563 | + $details['dmdId'] = (isset($attributes['DMDID']) ? $attributes['DMDID'] : ''); |
|
| 564 | 564 | |
| 565 | 565 | $details['label'] = (isset($attributes['LABEL']) ? $attributes['LABEL'] : ''); |
| 566 | 566 | |
@@ -633,7 +633,7 @@ discard block |
||
| 633 | 633 | } |
| 634 | 634 | |
| 635 | 635 | // Get the files this structure element is pointing at. |
| 636 | - $details['files'] = array (); |
|
| 636 | + $details['files'] = array(); |
|
| 637 | 637 | |
| 638 | 638 | $fileUse = $this->_getFileGrps(); |
| 639 | 639 | |
@@ -655,7 +655,7 @@ discard block |
||
| 655 | 655 | // Walk the structure recursively? And are there any children of the current element? |
| 656 | 656 | if ($recursive && count($structure->children('http://www.loc.gov/METS/')->div)) { |
| 657 | 657 | |
| 658 | - $details['children'] = array (); |
|
| 658 | + $details['children'] = array(); |
|
| 659 | 659 | |
| 660 | 660 | foreach ($structure->children('http://www.loc.gov/METS/')->div as $child) { |
| 661 | 661 | |
@@ -703,7 +703,7 @@ discard block |
||
| 703 | 703 | |
| 704 | 704 | } |
| 705 | 705 | |
| 706 | - return array (); |
|
| 706 | + return array(); |
|
| 707 | 707 | |
| 708 | 708 | } |
| 709 | 709 | |
@@ -715,23 +715,23 @@ discard block |
||
| 715 | 715 | } |
| 716 | 716 | |
| 717 | 717 | // Initialize metadata array with empty values. |
| 718 | - $metadata = array ( |
|
| 719 | - 'title' => array (), |
|
| 720 | - 'title_sorting' => array (), |
|
| 721 | - 'author' => array (), |
|
| 722 | - 'place' => array (), |
|
| 723 | - 'year' => array (), |
|
| 724 | - 'prod_id' => array (), |
|
| 725 | - 'record_id' => array (), |
|
| 726 | - 'opac_id' => array (), |
|
| 727 | - 'union_id' => array (), |
|
| 728 | - 'urn' => array (), |
|
| 729 | - 'purl' => array (), |
|
| 730 | - 'type' => array (), |
|
| 731 | - 'volume' => array (), |
|
| 732 | - 'volume_sorting' => array (), |
|
| 733 | - 'collection' => array (), |
|
| 734 | - 'owner' => array (), |
|
| 718 | + $metadata = array( |
|
| 719 | + 'title' => array(), |
|
| 720 | + 'title_sorting' => array(), |
|
| 721 | + 'author' => array(), |
|
| 722 | + 'place' => array(), |
|
| 723 | + 'year' => array(), |
|
| 724 | + 'prod_id' => array(), |
|
| 725 | + 'record_id' => array(), |
|
| 726 | + 'opac_id' => array(), |
|
| 727 | + 'union_id' => array(), |
|
| 728 | + 'urn' => array(), |
|
| 729 | + 'purl' => array(), |
|
| 730 | + 'type' => array(), |
|
| 731 | + 'volume' => array(), |
|
| 732 | + 'volume_sorting' => array(), |
|
| 733 | + 'collection' => array(), |
|
| 734 | + 'owner' => array(), |
|
| 735 | 735 | ); |
| 736 | 736 | |
| 737 | 737 | // Get the logical structure node's DMDID. |
@@ -786,20 +786,20 @@ discard block |
||
| 786 | 786 | |
| 787 | 787 | } |
| 788 | 788 | |
| 789 | - return array (); |
|
| 789 | + return array(); |
|
| 790 | 790 | |
| 791 | 791 | } |
| 792 | 792 | |
| 793 | 793 | // Get the structure's type. |
| 794 | 794 | if (!empty($this->logicalUnits[$id])) { |
| 795 | 795 | |
| 796 | - $metadata['type'] = array ($this->logicalUnits[$id]['type']); |
|
| 796 | + $metadata['type'] = array($this->logicalUnits[$id]['type']); |
|
| 797 | 797 | |
| 798 | 798 | } else { |
| 799 | 799 | |
| 800 | 800 | $struct = $this->mets->xpath('./mets:structMap[@TYPE="LOGICAL"]//mets:div[@ID="'.$id.'"]/@TYPE'); |
| 801 | 801 | |
| 802 | - $metadata['type'] = array ((string) $struct[0]); |
|
| 802 | + $metadata['type'] = array((string) $struct[0]); |
|
| 803 | 803 | |
| 804 | 804 | } |
| 805 | 805 | |
@@ -828,7 +828,7 @@ discard block |
||
| 828 | 828 | |
| 829 | 829 | if ($values instanceof DOMNodeList && $values->length > 0) { |
| 830 | 830 | |
| 831 | - $metadata[$resArray['index_name']] = array (); |
|
| 831 | + $metadata[$resArray['index_name']] = array(); |
|
| 832 | 832 | |
| 833 | 833 | foreach ($values as $value) { |
| 834 | 834 | |
@@ -838,7 +838,7 @@ discard block |
||
| 838 | 838 | |
| 839 | 839 | } elseif (!($values instanceof DOMNodeList)) { |
| 840 | 840 | |
| 841 | - $metadata[$resArray['index_name']] = array (trim((string) $values)); |
|
| 841 | + $metadata[$resArray['index_name']] = array(trim((string) $values)); |
|
| 842 | 842 | |
| 843 | 843 | } |
| 844 | 844 | |
@@ -847,7 +847,7 @@ discard block |
||
| 847 | 847 | // Set default value if applicable. |
| 848 | 848 | if (empty($metadata[$resArray['index_name']][0]) && $resArray['default_value']) { |
| 849 | 849 | |
| 850 | - $metadata[$resArray['index_name']] = array ($resArray['default_value']); |
|
| 850 | + $metadata[$resArray['index_name']] = array($resArray['default_value']); |
|
| 851 | 851 | |
| 852 | 852 | } |
| 853 | 853 | |
@@ -890,7 +890,7 @@ discard block |
||
| 890 | 890 | } else { |
| 891 | 891 | |
| 892 | 892 | // There is no dmdSec for this structure node. |
| 893 | - return array (); |
|
| 893 | + return array(); |
|
| 894 | 894 | |
| 895 | 895 | } |
| 896 | 896 | |
@@ -1120,7 +1120,7 @@ discard block |
||
| 1120 | 1120 | while ($resArray = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($result)) { |
| 1121 | 1121 | |
| 1122 | 1122 | // Update format registry. |
| 1123 | - $this->formats[$resArray['type']] = array ( |
|
| 1123 | + $this->formats[$resArray['type']] = array( |
|
| 1124 | 1124 | 'rootElement' => $resArray['root'], |
| 1125 | 1125 | 'namespaceURI' => $resArray['namespace'], |
| 1126 | 1126 | 'class' => $resArray['class'] |
@@ -1303,7 +1303,7 @@ discard block |
||
| 1303 | 1303 | |
| 1304 | 1304 | if (TYPO3_DLOG) { |
| 1305 | 1305 | |
| 1306 | - \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('[tx_dlf_document->save('.$_pid.', '.$_core.')] Could not identify document/structure type ' . $GLOBALS['TYPO3_DB']->fullQuoteStr($metadata['type'][0], 'tx_dlf_structures'), |
|
| 1306 | + \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('[tx_dlf_document->save('.$_pid.', '.$_core.')] Could not identify document/structure type '.$GLOBALS['TYPO3_DB']->fullQuoteStr($metadata['type'][0], 'tx_dlf_structures'), |
|
| 1307 | 1307 | self::$extKey, SYSLOG_SEVERITY_ERROR); |
| 1308 | 1308 | |
| 1309 | 1309 | } |
@@ -1315,7 +1315,7 @@ discard block |
||
| 1315 | 1315 | $metadata['type'][0] = $structure; |
| 1316 | 1316 | |
| 1317 | 1317 | // Get UIDs for collections. |
| 1318 | - $collections = array (); |
|
| 1318 | + $collections = array(); |
|
| 1319 | 1319 | |
| 1320 | 1320 | $result = $GLOBALS['TYPO3_DB']->exec_SELECTquery( |
| 1321 | 1321 | 'tx_dlf_collections.index_name AS index_name,tx_dlf_collections.uid AS uid', |
@@ -1346,7 +1346,7 @@ discard block |
||
| 1346 | 1346 | // Insert new collection. |
| 1347 | 1347 | $collNewUid = uniqid('NEW'); |
| 1348 | 1348 | |
| 1349 | - $collData['tx_dlf_collections'][$collNewUid] = array ( |
|
| 1349 | + $collData['tx_dlf_collections'][$collNewUid] = array( |
|
| 1350 | 1350 | 'pid' => $pid, |
| 1351 | 1351 | 'label' => $collection, |
| 1352 | 1352 | 'index_name' => $collection, |
@@ -1422,7 +1422,7 @@ discard block |
||
| 1422 | 1422 | // Insert new library. |
| 1423 | 1423 | $libNewUid = uniqid('NEW'); |
| 1424 | 1424 | |
| 1425 | - $libData['tx_dlf_libraries'][$libNewUid] = array ( |
|
| 1425 | + $libData['tx_dlf_libraries'][$libNewUid] = array( |
|
| 1426 | 1426 | 'pid' => $pid, |
| 1427 | 1427 | 'label' => $metadata['owner'][0], |
| 1428 | 1428 | 'index_name' => $metadata['owner'][0], |
@@ -1472,7 +1472,7 @@ discard block |
||
| 1472 | 1472 | |
| 1473 | 1473 | if ($parentLocation != $this->location) { |
| 1474 | 1474 | |
| 1475 | - $parentDoc =& tx_dlf_document::getInstance($parentLocation, $pid); |
|
| 1475 | + $parentDoc = & tx_dlf_document::getInstance($parentLocation, $pid); |
|
| 1476 | 1476 | |
| 1477 | 1477 | if ($parentDoc->ready) { |
| 1478 | 1478 | |
@@ -1526,9 +1526,9 @@ discard block |
||
| 1526 | 1526 | } |
| 1527 | 1527 | |
| 1528 | 1528 | // Get metadata for lists and sorting. |
| 1529 | - $listed = array (); |
|
| 1529 | + $listed = array(); |
|
| 1530 | 1530 | |
| 1531 | - $sortable = array (); |
|
| 1531 | + $sortable = array(); |
|
| 1532 | 1532 | |
| 1533 | 1533 | $result = $GLOBALS['TYPO3_DB']->exec_SELECTquery( |
| 1534 | 1534 | 'tx_dlf_metadata.index_name AS index_name,tx_dlf_metadata.is_listed AS is_listed,tx_dlf_metadata.is_sortable AS is_sortable', |
@@ -1560,7 +1560,7 @@ discard block |
||
| 1560 | 1560 | } |
| 1561 | 1561 | |
| 1562 | 1562 | // Fill data array. |
| 1563 | - $data['tx_dlf_documents'][$this->uid] = array ( |
|
| 1563 | + $data['tx_dlf_documents'][$this->uid] = array( |
|
| 1564 | 1564 | 'pid' => $pid, |
| 1565 | 1565 | $GLOBALS['TCA']['tx_dlf_documents']['ctrl']['enablecolumns']['starttime'] => 0, |
| 1566 | 1566 | $GLOBALS['TCA']['tx_dlf_documents']['ctrl']['enablecolumns']['endtime'] => 0, |
@@ -1843,7 +1843,7 @@ discard block |
||
| 1843 | 1843 | |
| 1844 | 1844 | } |
| 1845 | 1845 | |
| 1846 | - return array (); |
|
| 1846 | + return array(); |
|
| 1847 | 1847 | |
| 1848 | 1848 | } |
| 1849 | 1849 | |
@@ -2386,7 +2386,7 @@ discard block |
||
| 2386 | 2386 | $hookObjects = tx_dlf_helper::getHookObjects('common/class.tx_dlf_document.php'); |
| 2387 | 2387 | |
| 2388 | 2388 | // Apply hooks. |
| 2389 | - foreach($hookObjects as $hookObj) { |
|
| 2389 | + foreach ($hookObjects as $hookObj) { |
|
| 2390 | 2390 | |
| 2391 | 2391 | if (method_exists($hookObj, 'construct_postProcessRecordId')) { |
| 2392 | 2392 | |
@@ -2565,7 +2565,7 @@ discard block |
||
| 2565 | 2565 | // SimpleXMLElement objects can't be serialized, thus save the XML as string for serialization |
| 2566 | 2566 | $this->asXML = $this->xml->asXML(); |
| 2567 | 2567 | |
| 2568 | - return array ('uid', 'pid', 'recordId', 'parentId', 'asXML'); |
|
| 2568 | + return array('uid', 'pid', 'recordId', 'parentId', 'asXML'); |
|
| 2569 | 2569 | |
| 2570 | 2570 | } |
| 2571 | 2571 | |
@@ -34,14 +34,14 @@ discard block |
||
| 34 | 34 | * @var array |
| 35 | 35 | * @access protected |
| 36 | 36 | */ |
| 37 | - protected static $fields = array ( |
|
| 38 | - 'autocompleted' => array (), |
|
| 39 | - 'facets' => array (), |
|
| 40 | - 'sortables' => array (), |
|
| 41 | - 'indexed' => array (), |
|
| 42 | - 'stored' => array (), |
|
| 43 | - 'tokenized' => array (), |
|
| 44 | - 'fieldboost' => array () |
|
| 37 | + protected static $fields = array( |
|
| 38 | + 'autocompleted' => array(), |
|
| 39 | + 'facets' => array(), |
|
| 40 | + 'sortables' => array(), |
|
| 41 | + 'indexed' => array(), |
|
| 42 | + 'stored' => array(), |
|
| 43 | + 'tokenized' => array(), |
|
| 44 | + 'fieldboost' => array() |
|
| 45 | 45 | ); |
| 46 | 46 | |
| 47 | 47 | /** |
@@ -59,7 +59,7 @@ discard block |
||
| 59 | 59 | * @var array |
| 60 | 60 | * @access protected |
| 61 | 61 | */ |
| 62 | - protected static $processedDocs = array (); |
|
| 62 | + protected static $processedDocs = array(); |
|
| 63 | 63 | |
| 64 | 64 | /** |
| 65 | 65 | * Instance of Apache_Solr_Service class |
@@ -76,7 +76,7 @@ discard block |
||
| 76 | 76 | * @var array |
| 77 | 77 | * @access protected |
| 78 | 78 | */ |
| 79 | - protected static $toplevel = array (); |
|
| 79 | + protected static $toplevel = array(); |
|
| 80 | 80 | |
| 81 | 81 | /** |
| 82 | 82 | * Insert given document into Solr index |
@@ -88,7 +88,7 @@ discard block |
||
| 88 | 88 | * |
| 89 | 89 | * @return integer 0 on success or 1 on failure |
| 90 | 90 | */ |
| 91 | - public static function add(tx_dlf_document &$doc, $core = 0) { |
|
| 91 | + public static function add(tx_dlf_document&$doc, $core = 0) { |
|
| 92 | 92 | |
| 93 | 93 | if (in_array($doc->uid, self::$processedDocs)) { |
| 94 | 94 | |
@@ -101,7 +101,7 @@ discard block |
||
| 101 | 101 | // Handle multi-volume documents. |
| 102 | 102 | if ($doc->parentId) { |
| 103 | 103 | |
| 104 | - $parent =& tx_dlf_document::getInstance($doc->parentId, 0, TRUE); |
|
| 104 | + $parent = & tx_dlf_document::getInstance($doc->parentId, 0, TRUE); |
|
| 105 | 105 | |
| 106 | 106 | if ($parent->ready) { |
| 107 | 107 | |
@@ -535,7 +535,7 @@ discard block |
||
| 535 | 535 | * |
| 536 | 536 | * @return integer 0 on success or 1 on failure |
| 537 | 537 | */ |
| 538 | - protected static function processLogical(tx_dlf_document &$doc, array $logicalUnit) { |
|
| 538 | + protected static function processLogical(tx_dlf_document&$doc, array $logicalUnit) { |
|
| 539 | 539 | |
| 540 | 540 | $errors = 0; |
| 541 | 541 | |
@@ -595,13 +595,13 @@ discard block |
||
| 595 | 595 | |
| 596 | 596 | $solrDoc->setField('purl', $metadata['purl'][0]); |
| 597 | 597 | |
| 598 | - $solrDoc->setField('location',$doc->location); |
|
| 598 | + $solrDoc->setField('location', $doc->location); |
|
| 599 | 599 | |
| 600 | 600 | $solrDoc->setField('urn', $metadata['urn']); |
| 601 | 601 | |
| 602 | 602 | $solrDoc->setField('collection', $metadata['collection']); |
| 603 | 603 | |
| 604 | - $autocomplete = array (); |
|
| 604 | + $autocomplete = array(); |
|
| 605 | 605 | |
| 606 | 606 | foreach ($metadata as $index_name => $data) { |
| 607 | 607 | |
@@ -710,7 +710,7 @@ discard block |
||
| 710 | 710 | * |
| 711 | 711 | * @return integer 0 on success or 1 on failure |
| 712 | 712 | */ |
| 713 | - protected static function processPhysical(tx_dlf_document &$doc, $page, array $physicalUnit) { |
|
| 713 | + protected static function processPhysical(tx_dlf_document&$doc, $page, array $physicalUnit) { |
|
| 714 | 714 | |
| 715 | 715 | $errors = 0; |
| 716 | 716 | |
@@ -46,7 +46,7 @@ discard block |
||
| 46 | 46 | * @var array |
| 47 | 47 | * @access protected |
| 48 | 48 | */ |
| 49 | - protected $buttonArray = array (); |
|
| 49 | + protected $buttonArray = array(); |
|
| 50 | 50 | |
| 51 | 51 | /** |
| 52 | 52 | * Holds the module's marker array |
@@ -54,7 +54,7 @@ discard block |
||
| 54 | 54 | * @var array |
| 55 | 55 | * @access protected |
| 56 | 56 | */ |
| 57 | - protected $markerArray = array (); |
|
| 57 | + protected $markerArray = array(); |
|
| 58 | 58 | |
| 59 | 59 | /** |
| 60 | 60 | * Holds the module's subpart array |
@@ -62,7 +62,7 @@ discard block |
||
| 62 | 62 | * @var array |
| 63 | 63 | * @access protected |
| 64 | 64 | */ |
| 65 | - protected $subpartArray = array (); |
|
| 65 | + protected $subpartArray = array(); |
|
| 66 | 66 | |
| 67 | 67 | /** |
| 68 | 68 | * Holds the TYPO3_CONF_VARS array of this extension |
@@ -70,7 +70,7 @@ discard block |
||
| 70 | 70 | * @var array |
| 71 | 71 | * @access protected |
| 72 | 72 | */ |
| 73 | - protected $conf = array (); |
|
| 73 | + protected $conf = array(); |
|
| 74 | 74 | |
| 75 | 75 | /** |
| 76 | 76 | * Holds the submitted form's data |
@@ -105,7 +105,7 @@ discard block |
||
| 105 | 105 | |
| 106 | 106 | $this->doc->setModuleTemplate('EXT:'.$this->extKey.'/modules/'.$this->modPath.'template.tmpl'); |
| 107 | 107 | |
| 108 | - $this->doc->getPageRenderer()->addCssFile(\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extRelPath($this->extKey) . 'res/backend.css'); |
|
| 108 | + $this->doc->getPageRenderer()->addCssFile(\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extRelPath($this->extKey).'res/backend.css'); |
|
| 109 | 109 | |
| 110 | 110 | $this->doc->backPath = $GLOBALS['BACK_PATH']; |
| 111 | 111 | |
@@ -57,7 +57,7 @@ |
||
| 57 | 57 | |
| 58 | 58 | } elseif (($nameParts = $authors[$i]->xpath('./mods:namePart'))) { |
| 59 | 59 | |
| 60 | - $name = array (); |
|
| 60 | + $name = array(); |
|
| 61 | 61 | |
| 62 | 62 | $k = 4; |
| 63 | 63 | |
@@ -60,7 +60,7 @@ discard block |
||
| 60 | 60 | protected function init(array $conf) { |
| 61 | 61 | |
| 62 | 62 | // Read FlexForm configuration. |
| 63 | - $flexFormConf = array (); |
|
| 63 | + $flexFormConf = array(); |
|
| 64 | 64 | |
| 65 | 65 | $this->cObj->readFlexformIntoConf($this->cObj->data['pi_flexform'], $flexFormConf); |
| 66 | 66 | |
@@ -132,7 +132,7 @@ discard block |
||
| 132 | 132 | $pid = (!empty($this->conf['excludeOther']) ? intval($this->conf['pages']) : 0); |
| 133 | 133 | |
| 134 | 134 | // Get instance of tx_dlf_document. |
| 135 | - $this->doc =& tx_dlf_document::getInstance($this->piVars['id'], $pid); |
|
| 135 | + $this->doc = & tx_dlf_document::getInstance($this->piVars['id'], $pid); |
|
| 136 | 136 | |
| 137 | 137 | if (!$this->doc->ready) { |
| 138 | 138 | |
@@ -228,7 +228,7 @@ discard block |
||
| 228 | 228 | |
| 229 | 229 | foreach ($this->conf['_DEFAULT_PI_VARS.'] as $GPkey => $GPval) { |
| 230 | 230 | |
| 231 | - if (strpos($GPkey,'.')) { |
|
| 231 | + if (strpos($GPkey, '.')) { |
|
| 232 | 232 | |
| 233 | 233 | $GPkey = substr($GPkey, 0, -1); |
| 234 | 234 | |