We could not synchronize checks via GitHub's checks API since Scrutinizer's GitHub App is not installed for this repository.
@@ -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 |
@@ -91,7 +91,7 @@ discard block |
||
91 | 91 | |
92 | 92 | $GLOBALS['BE_USER']->modAccess($GLOBALS['MCONF'], 1); |
93 | 93 | |
94 | - $GLOBALS['LANG']->includeLLFile('EXT:'.$this->extKey.'/modules/'.$this->modPath.'locallang.xml'); |
|
94 | + $GLOBALS['LANG']->includeLLFile('EXT:' . $this->extKey . '/modules/' . $this->modPath . 'locallang.xml'); |
|
95 | 95 | |
96 | 96 | $this->setMOD_MENU(); |
97 | 97 | |
@@ -103,13 +103,13 @@ discard block |
||
103 | 103 | |
104 | 104 | $this->doc = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Backend\\Template\\DocumentTemplate'); |
105 | 105 | |
106 | - $this->doc->setModuleTemplate('EXT:'.$this->extKey.'/modules/'.$this->modPath.'template.tmpl'); |
|
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 | |
112 | - $this->doc->bodyTagAdditions = 'class="ext-'.$this->extKey.'-modules"'; |
|
112 | + $this->doc->bodyTagAdditions = 'class="ext-' . $this->extKey . '-modules"'; |
|
113 | 113 | |
114 | 114 | $this->doc->form = '<form action="" method="post" enctype="multipart/form-data">'; |
115 | 115 | |
@@ -180,7 +180,7 @@ discard block |
||
180 | 180 | // Set defaults for buttons and menu. |
181 | 181 | if (empty($this->buttonArray['RELOAD'])) { |
182 | 182 | |
183 | - $this->buttonArray['RELOAD'] = '<a href="'.$GLOBALS['MCONF']['_'].'" title="'.$GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:labels.reload', TRUE).'">'.\TYPO3\CMS\Backend\Utility\IconUtility::getSpriteIcon('actions-system-refresh').'</a>'; |
|
183 | + $this->buttonArray['RELOAD'] = '<a href="' . $GLOBALS['MCONF']['_'] . '" title="' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:labels.reload', TRUE) . '">' . \TYPO3\CMS\Backend\Utility\IconUtility::getSpriteIcon('actions-system-refresh') . '</a>'; |
|
184 | 184 | |
185 | 185 | } |
186 | 186 | |
@@ -192,7 +192,7 @@ discard block |
||
192 | 192 | |
193 | 193 | if (empty($this->markerArray['CSH'])) { |
194 | 194 | |
195 | - $this->markerArray['CSH'] = \TYPO3\CMS\Backend\Utility\BackendUtility::cshItem('_MOD_'.$GLOBALS['MCONF']['name'], 'csh', $GLOBALS['BACK_PATH'], '', TRUE); |
|
195 | + $this->markerArray['CSH'] = \TYPO3\CMS\Backend\Utility\BackendUtility::cshItem('_MOD_' . $GLOBALS['MCONF']['name'], 'csh', $GLOBALS['BACK_PATH'], '', TRUE); |
|
196 | 196 | |
197 | 197 | } |
198 | 198 |
@@ -18,7 +18,8 @@ discard block |
||
18 | 18 | * @access public |
19 | 19 | * @abstract |
20 | 20 | */ |
21 | -abstract class tx_dlf_module extends \TYPO3\CMS\Backend\Module\BaseScriptClass { |
|
21 | +abstract class tx_dlf_module extends \TYPO3\CMS\Backend\Module\BaseScriptClass |
|
22 | +{ |
|
22 | 23 | |
23 | 24 | public $extKey = 'dlf'; |
24 | 25 | |
@@ -87,7 +88,8 @@ discard block |
||
87 | 88 | * |
88 | 89 | * @return void |
89 | 90 | */ |
90 | - public function __construct() { |
|
91 | + public function __construct() |
|
92 | + { |
|
91 | 93 | |
92 | 94 | $GLOBALS['BE_USER']->modAccess($GLOBALS['MCONF'], 1); |
93 | 95 | |
@@ -124,7 +126,8 @@ discard block |
||
124 | 126 | * |
125 | 127 | * @return void |
126 | 128 | */ |
127 | - protected function setMOD_MENU() { |
|
129 | + protected function setMOD_MENU() |
|
130 | + { |
|
128 | 131 | |
129 | 132 | // Set $this->MOD_MENU array here or leave empty. |
130 | 133 | |
@@ -157,7 +160,8 @@ discard block |
||
157 | 160 | * |
158 | 161 | * @return void |
159 | 162 | */ |
160 | - protected function printContent() { |
|
163 | + protected function printContent() |
|
164 | + { |
|
161 | 165 | |
162 | 166 | // Add Javascript for function menu. |
163 | 167 | $this->doc->JScode .= ' |
@@ -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 | |
@@ -71,7 +71,7 @@ discard block |
||
71 | 71 | } |
72 | 72 | |
73 | 73 | // Read plugin TS configuration. |
74 | - $pluginConf = $GLOBALS['TSFE']->tmpl->setup['plugin.'][get_class($this).'.']; |
|
74 | + $pluginConf = $GLOBALS['TSFE']->tmpl->setup['plugin.'][get_class($this) . '.']; |
|
75 | 75 | |
76 | 76 | if (is_array($pluginConf)) { |
77 | 77 | |
@@ -80,7 +80,7 @@ discard block |
||
80 | 80 | } |
81 | 81 | |
82 | 82 | // Read general TS configuration. |
83 | - $generalConf = $GLOBALS['TSFE']->tmpl->setup['plugin.'][$this->prefixId.'.']; |
|
83 | + $generalConf = $GLOBALS['TSFE']->tmpl->setup['plugin.'][$this->prefixId . '.']; |
|
84 | 84 | |
85 | 85 | if (is_array($generalConf)) { |
86 | 86 | |
@@ -141,7 +141,7 @@ discard block |
||
141 | 141 | |
142 | 142 | if (TYPO3_DLOG) { |
143 | 143 | |
144 | - \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('[tx_dlf_plugin->loadDocument()] Failed to load document with UID "'.$this->piVars['id'].'"', $this->extKey, SYSLOG_SEVERITY_ERROR); |
|
144 | + \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('[tx_dlf_plugin->loadDocument()] Failed to load document with UID "' . $this->piVars['id'] . '"', $this->extKey, SYSLOG_SEVERITY_ERROR); |
|
145 | 145 | |
146 | 146 | } |
147 | 147 | |
@@ -158,7 +158,7 @@ discard block |
||
158 | 158 | $result = $GLOBALS['TYPO3_DB']->exec_SELECTquery( |
159 | 159 | 'tx_dlf_documents.uid', |
160 | 160 | 'tx_dlf_documents', |
161 | - 'tx_dlf_documents.record_id='.$GLOBALS['TYPO3_DB']->fullQuoteStr($this->piVars['recordId'], 'tx_dlf_documents').tx_dlf_helper::whereClause('tx_dlf_documents'), |
|
161 | + 'tx_dlf_documents.record_id=' . $GLOBALS['TYPO3_DB']->fullQuoteStr($this->piVars['recordId'], 'tx_dlf_documents') . tx_dlf_helper::whereClause('tx_dlf_documents'), |
|
162 | 162 | '', |
163 | 163 | '', |
164 | 164 | '1' |
@@ -181,7 +181,7 @@ discard block |
||
181 | 181 | |
182 | 182 | if (TYPO3_DLOG) { |
183 | 183 | |
184 | - \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('[tx_dlf_plugin->loadDocument()] Failed to load document with record ID "'.$this->piVars['recordId'].'"', $this->extKey, SYSLOG_SEVERITY_ERROR); |
|
184 | + \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('[tx_dlf_plugin->loadDocument()] Failed to load document with record ID "' . $this->piVars['recordId'] . '"', $this->extKey, SYSLOG_SEVERITY_ERROR); |
|
185 | 185 | |
186 | 186 | } |
187 | 187 | |
@@ -191,7 +191,7 @@ discard block |
||
191 | 191 | |
192 | 192 | if (TYPO3_DLOG) { |
193 | 193 | |
194 | - \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('[tx_dlf_plugin->loadDocument()] Invalid UID "'.$this->piVars['id'].'" or PID "'.$this->conf['pages'].'" for document loading', $this->extKey, SYSLOG_SEVERITY_ERROR); |
|
194 | + \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('[tx_dlf_plugin->loadDocument()] Invalid UID "' . $this->piVars['id'] . '" or PID "' . $this->conf['pages'] . '" for document loading', $this->extKey, SYSLOG_SEVERITY_ERROR); |
|
195 | 195 | |
196 | 196 | } |
197 | 197 | |
@@ -234,19 +234,19 @@ discard block |
||
234 | 234 | |
235 | 235 | } |
236 | 236 | |
237 | - if (is_array($this->conf['_DEFAULT_PI_VARS.'][$GPkey.'.']['stdWrap.'])) { |
|
237 | + if (is_array($this->conf['_DEFAULT_PI_VARS.'][$GPkey . '.']['stdWrap.'])) { |
|
238 | 238 | |
239 | 239 | $GPval = $GPval ? $GPval : ''; |
240 | 240 | |
241 | - $this->conf['_DEFAULT_PI_VARS.'][$GPkey] = $this->cObj->stdWrap($GPval, $this->conf['_DEFAULT_PI_VARS.'][$GPkey.'.']['stdWrap.']); |
|
241 | + $this->conf['_DEFAULT_PI_VARS.'][$GPkey] = $this->cObj->stdWrap($GPval, $this->conf['_DEFAULT_PI_VARS.'][$GPkey . '.']['stdWrap.']); |
|
242 | 242 | |
243 | - unset ($this->conf['_DEFAULT_PI_VARS.'][$GPkey.'.']['stdWrap.']); |
|
243 | + unset ($this->conf['_DEFAULT_PI_VARS.'][$GPkey . '.']['stdWrap.']); |
|
244 | 244 | |
245 | 245 | } |
246 | 246 | |
247 | 247 | } |
248 | 248 | |
249 | - $this->piVars = tx_dlf_helper::array_merge_recursive_overrule($this->conf['_DEFAULT_PI_VARS.'], is_array($this->piVars) ? $this->piVars : array ()); |
|
249 | + $this->piVars = tx_dlf_helper::array_merge_recursive_overrule($this->conf['_DEFAULT_PI_VARS.'], is_array($this->piVars) ? $this->piVars : array()); |
|
250 | 250 | |
251 | 251 | } |
252 | 252 | |
@@ -265,11 +265,11 @@ discard block |
||
265 | 265 | |
266 | 266 | if (!$GLOBALS['TSFE']->config['config']['disableWrapInBaseClass']) { |
267 | 267 | // Use get_class($this) instead of $this->prefixId for content wrapping because $this->prefixId is the same for all plugins. |
268 | - $content = '<div class="'.str_replace('_', '-', get_class($this)).'">'.$content.'</div>'; |
|
268 | + $content = '<div class="' . str_replace('_', '-', get_class($this)) . '">' . $content . '</div>'; |
|
269 | 269 | |
270 | 270 | if (!$GLOBALS['TSFE']->config['config']['disablePrefixComment']) { |
271 | 271 | |
272 | - $content = "\n\n<!-- BEGIN: Content of extension '".$this->extKey."', plugin '".get_class($this)."' -->\n\n".$content."\n\n<!-- END: Content of extension '".$this->extKey."', plugin '".get_class($this)."' -->\n\n"; |
|
272 | + $content = "\n\n<!-- BEGIN: Content of extension '" . $this->extKey . "', plugin '" . get_class($this) . "' -->\n\n" . $content . "\n\n<!-- END: Content of extension '" . $this->extKey . "', plugin '" . get_class($this) . "' -->\n\n"; |
|
273 | 273 | |
274 | 274 | } |
275 | 275 | } |
@@ -18,7 +18,8 @@ discard block |
||
18 | 18 | * @access public |
19 | 19 | * @abstract |
20 | 20 | */ |
21 | -abstract class tx_dlf_plugin extends \TYPO3\CMS\Frontend\Plugin\AbstractPlugin { |
|
21 | +abstract class tx_dlf_plugin extends \TYPO3\CMS\Frontend\Plugin\AbstractPlugin |
|
22 | +{ |
|
22 | 23 | |
23 | 24 | public $extKey = 'dlf'; |
24 | 25 | |
@@ -57,7 +58,8 @@ discard block |
||
57 | 58 | * |
58 | 59 | * @return void |
59 | 60 | */ |
60 | - protected function init(array $conf) { |
|
61 | + protected function init(array $conf) |
|
62 | + { |
|
61 | 63 | |
62 | 64 | // Read FlexForm configuration. |
63 | 65 | $flexFormConf = array (); |
@@ -123,7 +125,8 @@ discard block |
||
123 | 125 | * |
124 | 126 | * @return void |
125 | 127 | */ |
126 | - protected function loadDocument() { |
|
128 | + protected function loadDocument() |
|
129 | + { |
|
127 | 130 | |
128 | 131 | // Check for required variable. |
129 | 132 | if (!empty($this->piVars['id']) && !empty($this->conf['pages'])) { |
@@ -222,7 +225,8 @@ discard block |
||
222 | 225 | * |
223 | 226 | * @return void |
224 | 227 | */ |
225 | - public function pi_setPiVarDefaults() { |
|
228 | + public function pi_setPiVarDefaults() |
|
229 | + { |
|
226 | 230 | |
227 | 231 | if (is_array($this->conf['_DEFAULT_PI_VARS.'])) { |
228 | 232 | |
@@ -261,7 +265,8 @@ discard block |
||
261 | 265 | * |
262 | 266 | * @return string HTML content wrapped, ready to return to the parent object. |
263 | 267 | */ |
264 | - public function pi_wrapInBaseClass($content) { |
|
268 | + public function pi_wrapInBaseClass($content) |
|
269 | + { |
|
265 | 270 | |
266 | 271 | if (!$GLOBALS['TSFE']->config['config']['disableWrapInBaseClass']) { |
267 | 272 | // Use get_class($this) instead of $this->prefixId for content wrapping because $this->prefixId is the same for all plugins. |
@@ -287,7 +292,8 @@ discard block |
||
287 | 292 | * |
288 | 293 | * @return array The resulting typoscript array |
289 | 294 | */ |
290 | - protected function parseTS($string = '') { |
|
295 | + protected function parseTS($string = '') |
|
296 | + { |
|
291 | 297 | |
292 | 298 | $parser = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\TypoScript\\Parser\\TypoScriptParser'); |
293 | 299 | |
@@ -306,7 +312,8 @@ discard block |
||
306 | 312 | * |
307 | 313 | * @return void |
308 | 314 | */ |
309 | - protected function setCache($cache = TRUE) { |
|
315 | + protected function setCache($cache = TRUE) |
|
316 | + { |
|
310 | 317 | |
311 | 318 | if ($cache) { |
312 | 319 |
@@ -66,7 +66,7 @@ discard block |
||
66 | 66 | * @var array |
67 | 67 | * @access protected |
68 | 68 | */ |
69 | - protected $params = array (); |
|
69 | + protected $params = array(); |
|
70 | 70 | |
71 | 71 | /** |
72 | 72 | * Is the search instantiated successfully? |
@@ -82,7 +82,7 @@ discard block |
||
82 | 82 | * @var array(tx_dlf_solr) |
83 | 83 | * @access protected |
84 | 84 | */ |
85 | - protected static $registry = array (); |
|
85 | + protected static $registry = array(); |
|
86 | 86 | |
87 | 87 | /** |
88 | 88 | * This holds the Solr service object |
@@ -134,12 +134,12 @@ discard block |
||
134 | 134 | if (preg_match('/^[[:alnum:]]+_[tu][su]i:\(?.*\)?$/', $query)) { |
135 | 135 | |
136 | 136 | // Get all indexed fields. |
137 | - $fields = array (); |
|
137 | + $fields = array(); |
|
138 | 138 | |
139 | 139 | $result = $GLOBALS['TYPO3_DB']->exec_SELECTquery( |
140 | 140 | 'tx_dlf_metadata.index_name,tx_dlf_metadata.index_tokenized,tx_dlf_metadata.index_stored', |
141 | 141 | 'tx_dlf_metadata', |
142 | - 'tx_dlf_metadata.index_indexed=1 AND tx_dlf_metadata.pid='.intval($pid).' AND (tx_dlf_metadata.sys_language_uid IN (-1,0) OR tx_dlf_metadata.l18n_parent=0)'.tx_dlf_helper::whereClause('tx_dlf_metadata'), |
|
142 | + 'tx_dlf_metadata.index_indexed=1 AND tx_dlf_metadata.pid=' . intval($pid) . ' AND (tx_dlf_metadata.sys_language_uid IN (-1,0) OR tx_dlf_metadata.l18n_parent=0)' . tx_dlf_helper::whereClause('tx_dlf_metadata'), |
|
143 | 143 | '', |
144 | 144 | '', |
145 | 145 | '' |
@@ -149,7 +149,7 @@ discard block |
||
149 | 149 | |
150 | 150 | while ($resArray = $GLOBALS['TYPO3_DB']->sql_fetch_row($result)) { |
151 | 151 | |
152 | - $fields[] = $resArray[0].'_'.($resArray[1] ? 't' : 'u').($resArray[2] ? 's' : 'u').'i'; |
|
152 | + $fields[] = $resArray[0] . '_' . ($resArray[1] ? 't' : 'u') . ($resArray[2] ? 's' : 'u') . 'i'; |
|
153 | 153 | |
154 | 154 | } |
155 | 155 | |
@@ -160,7 +160,7 @@ discard block |
||
160 | 160 | |
161 | 161 | if (in_array($splitQuery[0], $fields)) { |
162 | 162 | |
163 | - $query = $splitQuery[0].':('.self::escapeQuery(trim($splitQuery[1], '()')).')'; |
|
163 | + $query = $splitQuery[0] . ':(' . self::escapeQuery(trim($splitQuery[1], '()')) . ')'; |
|
164 | 164 | |
165 | 165 | } else { |
166 | 166 | |
@@ -205,7 +205,7 @@ discard block |
||
205 | 205 | |
206 | 206 | if (TYPO3_DLOG) { |
207 | 207 | |
208 | - \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('[tx_dlf_solr->getInstance('.$_core.')] Invalid core name "'.$core.'" for Apache Solr', self::$extKey, SYSLOG_SEVERITY_ERROR); |
|
208 | + \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('[tx_dlf_solr->getInstance(' . $_core . ')] Invalid core name "' . $core . '" for Apache Solr', self::$extKey, SYSLOG_SEVERITY_ERROR); |
|
209 | 209 | |
210 | 210 | } |
211 | 211 | |
@@ -236,7 +236,7 @@ discard block |
||
236 | 236 | |
237 | 237 | if (TYPO3_DLOG) { |
238 | 238 | |
239 | - \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('[tx_dlf_solr->getInstance('.$_core.')] Could not connect to Apache Solr server', self::$extKey, SYSLOG_SEVERITY_ERROR); |
|
239 | + \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('[tx_dlf_solr->getInstance(' . $_core . ')] Could not connect to Apache Solr server', self::$extKey, SYSLOG_SEVERITY_ERROR); |
|
240 | 240 | |
241 | 241 | } |
242 | 242 | |
@@ -255,7 +255,7 @@ discard block |
||
255 | 255 | */ |
256 | 256 | public static function getSolrConnectionInfo() { |
257 | 257 | |
258 | - $solrInfo = array (); |
|
258 | + $solrInfo = array(); |
|
259 | 259 | |
260 | 260 | // Extract extension configuration. |
261 | 261 | $conf = unserialize($GLOBALS['TYPO3_CONF_VARS']['EXT']['extConf'][self::$extKey]); |
@@ -299,7 +299,7 @@ discard block |
||
299 | 299 | |
300 | 300 | if ($solrInfo['username'] && $solrInfo['password']) { |
301 | 301 | |
302 | - $host = $solrInfo['username'].':'.$solrInfo['password'].'@'.$solrInfo['host']; |
|
302 | + $host = $solrInfo['username'] . ':' . $solrInfo['password'] . '@' . $solrInfo['host']; |
|
303 | 303 | |
304 | 304 | } else { |
305 | 305 | |
@@ -308,7 +308,7 @@ discard block |
||
308 | 308 | } |
309 | 309 | |
310 | 310 | // Return entire request URL. |
311 | - return $solrInfo['scheme'].'://'.$host.':'.$solrInfo['port'].'/'.$solrInfo['path'].'/'.$core; |
|
311 | + return $solrInfo['scheme'] . '://' . $host . ':' . $solrInfo['port'] . '/' . $solrInfo['path'] . '/' . $core; |
|
312 | 312 | |
313 | 313 | } |
314 | 314 | |
@@ -326,7 +326,7 @@ discard block |
||
326 | 326 | $start = max(intval($start), 0); |
327 | 327 | |
328 | 328 | // Check if core already exists. |
329 | - if (self::getInstance('dlfCore'.$start) === NULL) { |
|
329 | + if (self::getInstance('dlfCore' . $start) === NULL) { |
|
330 | 330 | |
331 | 331 | return $start; |
332 | 332 | |
@@ -347,12 +347,12 @@ discard block |
||
347 | 347 | */ |
348 | 348 | public function search() { |
349 | 349 | |
350 | - $toplevel = array (); |
|
350 | + $toplevel = array(); |
|
351 | 351 | |
352 | 352 | // Take over query parameters. |
353 | 353 | $params = $this->params; |
354 | 354 | |
355 | - $params['filterquery'] = isset($params['filterquery']) ? $params['filterquery'] : array (); |
|
355 | + $params['filterquery'] = isset($params['filterquery']) ? $params['filterquery'] : array(); |
|
356 | 356 | |
357 | 357 | // Set some query parameters. |
358 | 358 | $params['start'] = 0; |
@@ -367,7 +367,7 @@ discard block |
||
367 | 367 | // Restore query parameters |
368 | 368 | $params = $this->params; |
369 | 369 | |
370 | - $params['filterquery'] = isset($params['filterquery']) ? $params['filterquery'] : array (); |
|
370 | + $params['filterquery'] = isset($params['filterquery']) ? $params['filterquery'] : array(); |
|
371 | 371 | |
372 | 372 | // Restrict the fields to the required ones. |
373 | 373 | $params['fields'] = 'uid,id'; |
@@ -377,17 +377,17 @@ discard block |
||
377 | 377 | |
378 | 378 | if (isset($value['query'])) { |
379 | 379 | |
380 | - $params['filterquery'][$key]['query'] = '{!join from=uid to=uid}'.$value['query']; |
|
380 | + $params['filterquery'][$key]['query'] = '{!join from=uid to=uid}' . $value['query']; |
|
381 | 381 | |
382 | 382 | } |
383 | 383 | |
384 | 384 | } |
385 | 385 | |
386 | 386 | // Set filter query to just get toplevel documents. |
387 | - $params['filterquery'][] = array ('query' => 'toplevel:true'); |
|
387 | + $params['filterquery'][] = array('query' => 'toplevel:true'); |
|
388 | 388 | |
389 | 389 | // Set join query to get all documents with the same uids. |
390 | - $params['query'] = '{!join from=uid to=uid}'.$params['query']; |
|
390 | + $params['query'] = '{!join from=uid to=uid}' . $params['query']; |
|
391 | 391 | |
392 | 392 | // Perform search to determine the total number of toplevel hits and fetch the required rows. |
393 | 393 | $selectQuery = $this->service->createSelect($params); |
@@ -398,11 +398,11 @@ discard block |
||
398 | 398 | // Process results. |
399 | 399 | foreach ($results as $doc) { |
400 | 400 | |
401 | - $toplevel[$doc->id] = array ( |
|
401 | + $toplevel[$doc->id] = array( |
|
402 | 402 | 'u' => $doc->uid, |
403 | 403 | 'h' => '', |
404 | 404 | 's' => '', |
405 | - 'p' => array () |
|
405 | + 'p' => array() |
|
406 | 406 | ); |
407 | 407 | |
408 | 408 | } |
@@ -415,10 +415,10 @@ discard block |
||
415 | 415 | $list->add(array_values($toplevel)); |
416 | 416 | |
417 | 417 | // Set metadata for search. |
418 | - $list->metadata = array ( |
|
418 | + $list->metadata = array( |
|
419 | 419 | 'label' => '', |
420 | 420 | 'description' => '', |
421 | - 'options' => array ( |
|
421 | + 'options' => array( |
|
422 | 422 | 'source' => 'search', |
423 | 423 | 'engine' => 'solr', |
424 | 424 | 'select' => $this->params['query'], |
@@ -447,7 +447,7 @@ discard block |
||
447 | 447 | * |
448 | 448 | * @return array The Apache Solr Documents that were fetched |
449 | 449 | */ |
450 | - public function search_raw($query = '', $parameters = array ()) { |
|
450 | + public function search_raw($query = '', $parameters = array()) { |
|
451 | 451 | |
452 | 452 | // Set additional query parameters. |
453 | 453 | $parameters['start'] = 0; |
@@ -595,13 +595,13 @@ discard block |
||
595 | 595 | */ |
596 | 596 | public function __get($var) { |
597 | 597 | |
598 | - $method = '_get'.ucfirst($var); |
|
598 | + $method = '_get' . ucfirst($var); |
|
599 | 599 | |
600 | 600 | if (!property_exists($this, $var) || !method_exists($this, $method)) { |
601 | 601 | |
602 | 602 | if (TYPO3_DLOG) { |
603 | 603 | |
604 | - \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('[tx_dlf_solr->__get('.$var.')] There is no getter function for property "'.$var.'"', self::$extKey, SYSLOG_SEVERITY_WARNING); |
|
604 | + \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('[tx_dlf_solr->__get(' . $var . ')] There is no getter function for property "' . $var . '"', self::$extKey, SYSLOG_SEVERITY_WARNING); |
|
605 | 605 | |
606 | 606 | } |
607 | 607 | |
@@ -627,13 +627,13 @@ discard block |
||
627 | 627 | */ |
628 | 628 | public function __set($var, $value) { |
629 | 629 | |
630 | - $method = '_set'.ucfirst($var); |
|
630 | + $method = '_set' . ucfirst($var); |
|
631 | 631 | |
632 | 632 | if (!property_exists($this, $var) || !method_exists($this, $method)) { |
633 | 633 | |
634 | 634 | if (TYPO3_DLOG) { |
635 | 635 | |
636 | - \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('[tx_dlf_solr->__set('.$var.', [data])] There is no setter function for property "'.$var.'"', self::$extKey, SYSLOG_SEVERITY_WARNING, $value); |
|
636 | + \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('[tx_dlf_solr->__set(' . $var . ', [data])] There is no setter function for property "' . $var . '"', self::$extKey, SYSLOG_SEVERITY_WARNING, $value); |
|
637 | 637 | |
638 | 638 | } |
639 | 639 | |
@@ -658,13 +658,13 @@ discard block |
||
658 | 658 | |
659 | 659 | $solrInfo = self::getSolrConnectionInfo(); |
660 | 660 | |
661 | - $config = array ( |
|
662 | - 'endpoint' => array ( |
|
663 | - 'dlf' => array ( |
|
661 | + $config = array( |
|
662 | + 'endpoint' => array( |
|
663 | + 'dlf' => array( |
|
664 | 664 | 'scheme' => $solrInfo['scheme'], |
665 | 665 | 'host' => $solrInfo['host'], |
666 | 666 | 'port' => $solrInfo['port'], |
667 | - 'path' => '/'.$solrInfo['path'].'/', |
|
667 | + 'path' => '/' . $solrInfo['path'] . '/', |
|
668 | 668 | 'core' => $core, |
669 | 669 | 'username' => $solrInfo['username'], |
670 | 670 | 'password' => $solrInfo['password'], |
@@ -18,7 +18,8 @@ discard block |
||
18 | 18 | * @subpackage tx_dlf |
19 | 19 | * @access public |
20 | 20 | */ |
21 | -class tx_dlf_solr { |
|
21 | +class tx_dlf_solr |
|
22 | +{ |
|
22 | 23 | |
23 | 24 | /** |
24 | 25 | * This holds the core name |
@@ -101,7 +102,8 @@ discard block |
||
101 | 102 | * |
102 | 103 | * @return string The escaped query string |
103 | 104 | */ |
104 | - public static function escapeQuery($query) { |
|
105 | + public static function escapeQuery($query) |
|
106 | + { |
|
105 | 107 | |
106 | 108 | $helper = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('Solarium\Core\Query\Helper'); |
107 | 109 | |
@@ -128,7 +130,8 @@ discard block |
||
128 | 130 | * |
129 | 131 | * @return string The escaped query string |
130 | 132 | */ |
131 | - public static function escapeQueryKeepField($query, $pid) { |
|
133 | + public static function escapeQueryKeepField($query, $pid) |
|
134 | + { |
|
132 | 135 | |
133 | 136 | // Is there a field query? |
134 | 137 | if (preg_match('/^[[:alnum:]]+_[tu][su]i:\(?.*\)?$/', $query)) { |
@@ -188,7 +191,8 @@ discard block |
||
188 | 191 | * |
189 | 192 | * @return tx_dlf_solr Instance of this class |
190 | 193 | */ |
191 | - public static function getInstance($core) { |
|
194 | + public static function getInstance($core) |
|
195 | + { |
|
192 | 196 | |
193 | 197 | // Save parameter for logging purposes. |
194 | 198 | $_core = $core; |
@@ -253,7 +257,8 @@ discard block |
||
253 | 257 | * |
254 | 258 | * @return string The connection parameters for a specific Solr core |
255 | 259 | */ |
256 | - public static function getSolrConnectionInfo() { |
|
260 | + public static function getSolrConnectionInfo() |
|
261 | + { |
|
257 | 262 | |
258 | 263 | $solrInfo = array (); |
259 | 264 | |
@@ -292,7 +297,8 @@ discard block |
||
292 | 297 | * |
293 | 298 | * @return string The request URL for a specific Solr core |
294 | 299 | */ |
295 | - public static function getSolrUrl($core = '') { |
|
300 | + public static function getSolrUrl($core = '') |
|
301 | + { |
|
296 | 302 | |
297 | 303 | // Get Solr connection information. |
298 | 304 | $solrInfo = self::getSolrConnectionInfo(); |
@@ -321,7 +327,8 @@ discard block |
||
321 | 327 | * |
322 | 328 | * @return integer First unused core number found |
323 | 329 | */ |
324 | - public static function solrGetCoreNumber($start = 0) { |
|
330 | + public static function solrGetCoreNumber($start = 0) |
|
331 | + { |
|
325 | 332 | |
326 | 333 | $start = max(intval($start), 0); |
327 | 334 | |
@@ -345,7 +352,8 @@ discard block |
||
345 | 352 | * |
346 | 353 | * @return tx_dlf_list The result list |
347 | 354 | */ |
348 | - public function search() { |
|
355 | + public function search() |
|
356 | + { |
|
349 | 357 | |
350 | 358 | $toplevel = array (); |
351 | 359 | |
@@ -447,7 +455,8 @@ discard block |
||
447 | 455 | * |
448 | 456 | * @return array The Apache Solr Documents that were fetched |
449 | 457 | */ |
450 | - public function search_raw($query = '', $parameters = array ()) { |
|
458 | + public function search_raw($query = '', $parameters = array ()) |
|
459 | + { |
|
451 | 460 | |
452 | 461 | // Set additional query parameters. |
453 | 462 | $parameters['start'] = 0; |
@@ -494,7 +503,8 @@ discard block |
||
494 | 503 | * |
495 | 504 | * @return integer The max number of results |
496 | 505 | */ |
497 | - protected function _getLimit() { |
|
506 | + protected function _getLimit() |
|
507 | + { |
|
498 | 508 | |
499 | 509 | return $this->limit; |
500 | 510 | |
@@ -507,7 +517,8 @@ discard block |
||
507 | 517 | * |
508 | 518 | * @return integer Total number of hits for last search |
509 | 519 | */ |
510 | - protected function _getNumberOfHits() { |
|
520 | + protected function _getNumberOfHits() |
|
521 | + { |
|
511 | 522 | |
512 | 523 | return $this->numberOfHits; |
513 | 524 | |
@@ -520,7 +531,8 @@ discard block |
||
520 | 531 | * |
521 | 532 | * @return boolean Is the search instantiated successfully? |
522 | 533 | */ |
523 | - protected function _getReady() { |
|
534 | + protected function _getReady() |
|
535 | + { |
|
524 | 536 | |
525 | 537 | return $this->ready; |
526 | 538 | |
@@ -533,7 +545,8 @@ discard block |
||
533 | 545 | * |
534 | 546 | * @return Solarium\Client Apache Solr service object |
535 | 547 | */ |
536 | - protected function _getService() { |
|
548 | + protected function _getService() |
|
549 | + { |
|
537 | 550 | |
538 | 551 | return $this->service; |
539 | 552 | |
@@ -548,7 +561,8 @@ discard block |
||
548 | 561 | * |
549 | 562 | * @return void |
550 | 563 | */ |
551 | - protected function _setCPid($value) { |
|
564 | + protected function _setCPid($value) |
|
565 | + { |
|
552 | 566 | |
553 | 567 | $this->cPid = max(intval($value), 0); |
554 | 568 | |
@@ -563,7 +577,8 @@ discard block |
||
563 | 577 | * |
564 | 578 | * @return void |
565 | 579 | */ |
566 | - protected function _setLimit($value) { |
|
580 | + protected function _setLimit($value) |
|
581 | + { |
|
567 | 582 | |
568 | 583 | $this->limit = max(intval($value), 0); |
569 | 584 | |
@@ -578,7 +593,8 @@ discard block |
||
578 | 593 | * |
579 | 594 | * @return void |
580 | 595 | */ |
581 | - protected function _setParams(array $value) { |
|
596 | + protected function _setParams(array $value) |
|
597 | + { |
|
582 | 598 | |
583 | 599 | $this->params = $value; |
584 | 600 | |
@@ -593,7 +609,8 @@ discard block |
||
593 | 609 | * |
594 | 610 | * @return mixed Value of $this->$var |
595 | 611 | */ |
596 | - public function __get($var) { |
|
612 | + public function __get($var) |
|
613 | + { |
|
597 | 614 | |
598 | 615 | $method = '_get'.ucfirst($var); |
599 | 616 | |
@@ -625,7 +642,8 @@ discard block |
||
625 | 642 | * |
626 | 643 | * @return void |
627 | 644 | */ |
628 | - public function __set($var, $value) { |
|
645 | + public function __set($var, $value) |
|
646 | + { |
|
629 | 647 | |
630 | 648 | $method = '_set'.ucfirst($var); |
631 | 649 | |
@@ -654,7 +672,8 @@ discard block |
||
654 | 672 | * |
655 | 673 | * @return void |
656 | 674 | */ |
657 | - protected function __construct($core) { |
|
675 | + protected function __construct($core) |
|
676 | + { |
|
658 | 677 | |
659 | 678 | $solrInfo = self::getSolrConnectionInfo(); |
660 | 679 |
@@ -18,7 +18,8 @@ |
||
18 | 18 | * @access public |
19 | 19 | * @abstract |
20 | 20 | */ |
21 | -interface tx_dlf_fulltext { |
|
21 | +interface tx_dlf_fulltext |
|
22 | +{ |
|
22 | 23 | |
23 | 24 | /** |
24 | 25 | * This extracts raw fulltext data from XML |
@@ -36,7 +36,7 @@ discard block |
||
36 | 36 | * @var array() |
37 | 37 | * @access protected |
38 | 38 | */ |
39 | - protected $elements = array (); |
|
39 | + protected $elements = array(); |
|
40 | 40 | |
41 | 41 | /** |
42 | 42 | * This holds the list's metadata |
@@ -44,7 +44,7 @@ discard block |
||
44 | 44 | * @var array |
45 | 45 | * @access protected |
46 | 46 | */ |
47 | - protected $metadata = array (); |
|
47 | + protected $metadata = array(); |
|
48 | 48 | |
49 | 49 | /** |
50 | 50 | * This holds the current list position |
@@ -61,7 +61,7 @@ discard block |
||
61 | 61 | * @var array() |
62 | 62 | * @access protected |
63 | 63 | */ |
64 | - protected $records = array (); |
|
64 | + protected $records = array(); |
|
65 | 65 | |
66 | 66 | /** |
67 | 67 | * Instance of tx_dlf_solr class |
@@ -77,7 +77,7 @@ discard block |
||
77 | 77 | * @var array |
78 | 78 | * @access protected |
79 | 79 | */ |
80 | - protected $solrConfig = array (); |
|
80 | + protected $solrConfig = array(); |
|
81 | 81 | |
82 | 82 | /** |
83 | 83 | * This adds an array of elements at the given position to the list |
@@ -135,7 +135,7 @@ discard block |
||
135 | 135 | |
136 | 136 | if (TYPO3_DLOG) { |
137 | 137 | |
138 | - \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('[tx_dlf_list->current()] Invalid position "'.$this->position.'" for list element', $this->extKey, SYSLOG_SEVERITY_NOTICE); |
|
138 | + \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('[tx_dlf_list->current()] Invalid position "' . $this->position . '" for list element', $this->extKey, SYSLOG_SEVERITY_NOTICE); |
|
139 | 139 | |
140 | 140 | } |
141 | 141 | |
@@ -156,7 +156,7 @@ discard block |
||
156 | 156 | */ |
157 | 157 | protected function getRecord($element) { |
158 | 158 | |
159 | - if (is_array($element) && array_keys($element) == array ('u', 'h', 's', 'p')) { |
|
159 | + if (is_array($element) && array_keys($element) == array('u', 'h', 's', 'p')) { |
|
160 | 160 | |
161 | 161 | // Return already processed record if possible. |
162 | 162 | if (!empty($this->records[$element['u']])) { |
@@ -165,7 +165,7 @@ discard block |
||
165 | 165 | |
166 | 166 | } |
167 | 167 | |
168 | - $record = array ( |
|
168 | + $record = array( |
|
169 | 169 | 'uid' => $element['u'], |
170 | 170 | 'page' => 1, |
171 | 171 | 'preview' => '', |
@@ -179,7 +179,7 @@ discard block |
||
179 | 179 | $result = $GLOBALS['TYPO3_DB']->exec_SELECTquery( |
180 | 180 | 'tx_dlf_documents.uid AS uid,tx_dlf_documents.thumbnail AS thumbnail,tx_dlf_documents.metadata AS metadata', |
181 | 181 | 'tx_dlf_documents', |
182 | - '(tx_dlf_documents.uid='.intval($record['uid']).' OR tx_dlf_documents.partof='.intval($record['uid']).')'.tx_dlf_helper::whereClause('tx_dlf_documents'), |
|
182 | + '(tx_dlf_documents.uid=' . intval($record['uid']) . ' OR tx_dlf_documents.partof=' . intval($record['uid']) . ')' . tx_dlf_helper::whereClause('tx_dlf_documents'), |
|
183 | 183 | '', |
184 | 184 | '', |
185 | 185 | '' |
@@ -224,9 +224,9 @@ discard block |
||
224 | 224 | |
225 | 225 | $record['metadata'] = $metadata; |
226 | 226 | |
227 | - } elseif (($key = array_search(array ('u' => $resArray['uid']), $record['subparts'], TRUE)) !== FALSE) { |
|
227 | + } elseif (($key = array_search(array('u' => $resArray['uid']), $record['subparts'], TRUE)) !== FALSE) { |
|
228 | 228 | |
229 | - $record['subparts'][$key] = array ( |
|
229 | + $record['subparts'][$key] = array( |
|
230 | 230 | 'uid' => $resArray['uid'], |
231 | 231 | 'page' => 1, |
232 | 232 | 'preview' => (!empty($record['subparts'][$key]['h']) ? $record['subparts'][$key]['h'] : ''), |
@@ -242,22 +242,22 @@ discard block |
||
242 | 242 | |
243 | 243 | if ($this->solrConnect()) { |
244 | 244 | |
245 | - $params = array (); |
|
245 | + $params = array(); |
|
246 | 246 | |
247 | 247 | // Restrict the fields to the required ones |
248 | 248 | $params['fields'] = 'uid,id,toplevel,thumbnail,page'; |
249 | 249 | |
250 | 250 | foreach ($this->solrConfig as $solr_name) { |
251 | 251 | |
252 | - $params['fields'] .= ','.$solr_name; |
|
252 | + $params['fields'] .= ',' . $solr_name; |
|
253 | 253 | |
254 | 254 | } |
255 | 255 | |
256 | 256 | // If it is a fulltext search, enable highlighting. |
257 | 257 | if ($this->metadata['fulltextSearch']) { |
258 | 258 | |
259 | - $params['component'] = array ( |
|
260 | - 'highlighting' => array ( |
|
259 | + $params['component'] = array( |
|
260 | + 'highlighting' => array( |
|
261 | 261 | 'query' => tx_dlf_solr::escapeQuery($this->metadata['searchString']), |
262 | 262 | 'field' => 'fulltext', |
263 | 263 | 'usefastvectorhighlighter' => TRUE |
@@ -274,27 +274,27 @@ discard block |
||
274 | 274 | $params['rows'] = 10000; |
275 | 275 | |
276 | 276 | // Take over existing filter queries. |
277 | - $params['filterquery'] = isset($this->metadata['options']['params']['filterquery']) ? $this->metadata['options']['params']['filterquery'] : array (); |
|
277 | + $params['filterquery'] = isset($this->metadata['options']['params']['filterquery']) ? $this->metadata['options']['params']['filterquery'] : array(); |
|
278 | 278 | |
279 | 279 | // Extend filter query to get all documents with the same uid. |
280 | 280 | foreach ($params['filterquery'] as $key => $value) { |
281 | 281 | |
282 | 282 | if (isset($value['query'])) { |
283 | 283 | |
284 | - $params['filterquery'][$key]['query'] = $value['query'].' OR toplevel:true'; |
|
284 | + $params['filterquery'][$key]['query'] = $value['query'] . ' OR toplevel:true'; |
|
285 | 285 | |
286 | 286 | } |
287 | 287 | |
288 | 288 | } |
289 | 289 | |
290 | 290 | // Add filter query to get all documents with the required uid. |
291 | - $params['filterquery'][] = array ('query' => 'uid:'.tx_dlf_solr::escapeQuery($record['uid'])); |
|
291 | + $params['filterquery'][] = array('query' => 'uid:' . tx_dlf_solr::escapeQuery($record['uid'])); |
|
292 | 292 | |
293 | 293 | // Add sorting |
294 | 294 | $params['sort'] = $this->metadata['options']['params']['sort']; |
295 | 295 | |
296 | 296 | // Set query |
297 | - $params['query'] = $this->metadata['options']['select'].' OR toplevel:true'; |
|
297 | + $params['query'] = $this->metadata['options']['select'] . ' OR toplevel:true'; |
|
298 | 298 | |
299 | 299 | // Perform search for all documents with the same uid that either fit to the search or marked as toplevel. |
300 | 300 | $selectQuery = $this->solr->service->createSelect($params); |
@@ -311,13 +311,13 @@ discard block |
||
311 | 311 | foreach ($result as $resArray) { |
312 | 312 | |
313 | 313 | // Prepare document's metadata. |
314 | - $metadata = array (); |
|
314 | + $metadata = array(); |
|
315 | 315 | |
316 | 316 | foreach ($this->solrConfig as $index_name => $solr_name) { |
317 | 317 | |
318 | 318 | if (!empty($resArray->$solr_name)) { |
319 | 319 | |
320 | - $metadata[$index_name] = (is_array($resArray->$solr_name) ? $resArray->$solr_name : array ($resArray->$solr_name)); |
|
320 | + $metadata[$index_name] = (is_array($resArray->$solr_name) ? $resArray->$solr_name : array($resArray->$solr_name)); |
|
321 | 321 | |
322 | 322 | } |
323 | 323 | |
@@ -335,7 +335,7 @@ discard block |
||
335 | 335 | $highlightedDoc = !empty($highlighting) ? $highlighting->getResult($resArray->id) : NULL; |
336 | 336 | $highlight = !empty($highlightedDoc) ? $highlightedDoc->getField('fulltext')[0] : ''; |
337 | 337 | |
338 | - $record['subparts'][$resArray->id] = array ( |
|
338 | + $record['subparts'][$resArray->id] = array( |
|
339 | 339 | 'uid' => $resArray->uid, |
340 | 340 | 'page' => $resArray->page, |
341 | 341 | 'preview' => $highlight, |
@@ -410,7 +410,7 @@ discard block |
||
410 | 410 | |
411 | 411 | if (TYPO3_DLOG) { |
412 | 412 | |
413 | - \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('[tx_dlf_list->move('.$_position.', '.$_steps.')] Invalid position "'.$position.'" for element moving', $this->extKey, SYSLOG_SEVERITY_WARNING); |
|
413 | + \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('[tx_dlf_list->move(' . $_position . ', ' . $_steps . ')] Invalid position "' . $position . '" for element moving', $this->extKey, SYSLOG_SEVERITY_WARNING); |
|
414 | 414 | |
415 | 415 | } |
416 | 416 | |
@@ -425,7 +425,7 @@ discard block |
||
425 | 425 | |
426 | 426 | if (TYPO3_DLOG) { |
427 | 427 | |
428 | - \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('[tx_dlf_list->move('.$_position.', '.$_steps.')] Invalid steps "'.$steps.'" for moving element at position "'.$position.'"', $this->extKey, SYSLOG_SEVERITY_WARNING); |
|
428 | + \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('[tx_dlf_list->move(' . $_position . ', ' . $_steps . ')] Invalid steps "' . $steps . '" for moving element at position "' . $position . '"', $this->extKey, SYSLOG_SEVERITY_WARNING); |
|
429 | 429 | |
430 | 430 | } |
431 | 431 | |
@@ -435,7 +435,7 @@ discard block |
||
435 | 435 | |
436 | 436 | $element = $this->remove($position); |
437 | 437 | |
438 | - $this->add(array ($element), $position + $steps); |
|
438 | + $this->add(array($element), $position + $steps); |
|
439 | 439 | |
440 | 440 | } |
441 | 441 | |
@@ -519,7 +519,7 @@ discard block |
||
519 | 519 | |
520 | 520 | if (TYPO3_DLOG) { |
521 | 521 | |
522 | - \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('[tx_dlf_list->offsetGet('.$offset.')] Invalid offset "'.$offset.'" for list element', $this->extKey, SYSLOG_SEVERITY_NOTICE); |
|
522 | + \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('[tx_dlf_list->offsetGet(' . $offset . ')] Invalid offset "' . $offset . '" for list element', $this->extKey, SYSLOG_SEVERITY_NOTICE); |
|
523 | 523 | |
524 | 524 | } |
525 | 525 | |
@@ -579,7 +579,7 @@ discard block |
||
579 | 579 | |
580 | 580 | if (TYPO3_DLOG) { |
581 | 581 | |
582 | - \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('[tx_dlf_list->remove('.$_position.')] Invalid position "'.$position.'" for element removing', $this->extKey, SYSLOG_SEVERITY_WARNING); |
|
582 | + \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('[tx_dlf_list->remove(' . $_position . ')] Invalid position "' . $position . '" for element removing', $this->extKey, SYSLOG_SEVERITY_WARNING); |
|
583 | 583 | |
584 | 584 | } |
585 | 585 | |
@@ -617,7 +617,7 @@ discard block |
||
617 | 617 | |
618 | 618 | if (TYPO3_DLOG) { |
619 | 619 | |
620 | - \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('[tx_dlf_list->remove('.$_position.')] Invalid position "'.$position.'" for element removing', $this->extKey, SYSLOG_SEVERITY_WARNING); |
|
620 | + \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('[tx_dlf_list->remove(' . $_position . ')] Invalid position "' . $position . '" for element removing', $this->extKey, SYSLOG_SEVERITY_WARNING); |
|
621 | 621 | } |
622 | 622 | |
623 | 623 | return; |
@@ -639,11 +639,11 @@ discard block |
||
639 | 639 | */ |
640 | 640 | public function reset() { |
641 | 641 | |
642 | - $this->elements = array (); |
|
642 | + $this->elements = array(); |
|
643 | 643 | |
644 | - $this->records = array (); |
|
644 | + $this->records = array(); |
|
645 | 645 | |
646 | - $this->metadata = array (); |
|
646 | + $this->metadata = array(); |
|
647 | 647 | |
648 | 648 | $this->count = 0; |
649 | 649 | |
@@ -685,7 +685,7 @@ discard block |
||
685 | 685 | |
686 | 686 | } else { |
687 | 687 | |
688 | - tx_dlf_helper::saveToSession(array ($this->elements, $this->metadata), get_class($this)); |
|
688 | + tx_dlf_helper::saveToSession(array($this->elements, $this->metadata), get_class($this)); |
|
689 | 689 | |
690 | 690 | } |
691 | 691 | |
@@ -710,7 +710,7 @@ discard block |
||
710 | 710 | $result = $GLOBALS['TYPO3_DB']->exec_SELECTquery( |
711 | 711 | 'tx_dlf_metadata.index_name AS index_name,tx_dlf_metadata.index_tokenized AS index_tokenized,tx_dlf_metadata.index_indexed AS index_indexed', |
712 | 712 | 'tx_dlf_metadata', |
713 | - 'tx_dlf_metadata.is_listed=1 AND tx_dlf_metadata.pid='.intval($this->metadata['options']['pid']).tx_dlf_helper::whereClause('tx_dlf_metadata'), |
|
713 | + 'tx_dlf_metadata.is_listed=1 AND tx_dlf_metadata.pid=' . intval($this->metadata['options']['pid']) . tx_dlf_helper::whereClause('tx_dlf_metadata'), |
|
714 | 714 | '', |
715 | 715 | 'tx_dlf_metadata.sorting ASC', |
716 | 716 | '' |
@@ -718,7 +718,7 @@ discard block |
||
718 | 718 | |
719 | 719 | while ($resArray = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($result)) { |
720 | 720 | |
721 | - $this->solrConfig[$resArray['index_name']] = $resArray['index_name'].'_'.($resArray['index_tokenized'] ? 't' : 'u').'s'.($resArray['index_indexed'] ? 'i' : 'u'); |
|
721 | + $this->solrConfig[$resArray['index_name']] = $resArray['index_name'] . '_' . ($resArray['index_tokenized'] ? 't' : 'u') . 's' . ($resArray['index_indexed'] ? 'i' : 'u'); |
|
722 | 722 | |
723 | 723 | } |
724 | 724 | |
@@ -749,16 +749,16 @@ discard block |
||
749 | 749 | */ |
750 | 750 | public function sort($by, $asc = TRUE) { |
751 | 751 | |
752 | - $newOrder = array (); |
|
752 | + $newOrder = array(); |
|
753 | 753 | |
754 | - $nonSortable = array (); |
|
754 | + $nonSortable = array(); |
|
755 | 755 | |
756 | 756 | foreach ($this->elements as $num => $element) { |
757 | 757 | |
758 | 758 | // Is this element sortable? |
759 | 759 | if (!empty($element['s'][$by])) { |
760 | 760 | |
761 | - $newOrder[$element['s'][$by].str_pad($num, 6, '0', STR_PAD_LEFT)] = $element; |
|
761 | + $newOrder[$element['s'][$by] . str_pad($num, 6, '0', STR_PAD_LEFT)] = $element; |
|
762 | 762 | |
763 | 763 | } else { |
764 | 764 | |
@@ -791,7 +791,7 @@ discard block |
||
791 | 791 | |
792 | 792 | if (TYPO3_DLOG) { |
793 | 793 | |
794 | - \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('[tx_dlf_list->sort('.$by.', ['.($asc ? 'TRUE' : 'FALSE').'])] Sorted list elements do not match unsorted elements', $this->extKey, SYSLOG_SEVERITY_ERROR); |
|
794 | + \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('[tx_dlf_list->sort(' . $by . ', [' . ($asc ? 'TRUE' : 'FALSE') . '])] Sorted list elements do not match unsorted elements', $this->extKey, SYSLOG_SEVERITY_ERROR); |
|
795 | 795 | |
796 | 796 | } |
797 | 797 | |
@@ -856,7 +856,7 @@ discard block |
||
856 | 856 | * |
857 | 857 | * @return void |
858 | 858 | */ |
859 | - protected function _setMetadata(array $metadata = array ()) { |
|
859 | + protected function _setMetadata(array $metadata = array()) { |
|
860 | 860 | |
861 | 861 | $this->metadata = $metadata; |
862 | 862 | |
@@ -872,7 +872,7 @@ discard block |
||
872 | 872 | * |
873 | 873 | * @return void |
874 | 874 | */ |
875 | - public function __construct(array $elements = array (), array $metadata = array ()) { |
|
875 | + public function __construct(array $elements = array(), array $metadata = array()) { |
|
876 | 876 | |
877 | 877 | if (empty($elements) && empty($metadata)) { |
878 | 878 | |
@@ -931,13 +931,13 @@ discard block |
||
931 | 931 | */ |
932 | 932 | public function __get($var) { |
933 | 933 | |
934 | - $method = '_get'.ucfirst($var); |
|
934 | + $method = '_get' . ucfirst($var); |
|
935 | 935 | |
936 | 936 | if (!property_exists($this, $var) || !method_exists($this, $method)) { |
937 | 937 | |
938 | 938 | if (TYPO3_DLOG) { |
939 | 939 | |
940 | - \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('[tx_dlf_list->__get('.$var.')] There is no getter function for property "'.$var.'"', $this->extKey, SYSLOG_SEVERITY_WARNING); |
|
940 | + \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('[tx_dlf_list->__get(' . $var . ')] There is no getter function for property "' . $var . '"', $this->extKey, SYSLOG_SEVERITY_WARNING); |
|
941 | 941 | |
942 | 942 | } |
943 | 943 | |
@@ -963,13 +963,13 @@ discard block |
||
963 | 963 | */ |
964 | 964 | public function __set($var, $value) { |
965 | 965 | |
966 | - $method = '_set'.ucfirst($var); |
|
966 | + $method = '_set' . ucfirst($var); |
|
967 | 967 | |
968 | 968 | if (!property_exists($this, $var) || !method_exists($this, $method)) { |
969 | 969 | |
970 | 970 | if (TYPO3_DLOG) { |
971 | 971 | |
972 | - \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('[tx_dlf_list->__set('.$var.', [data])] There is no setter function for property "'.$var.'"', $this->extKey, SYSLOG_SEVERITY_WARNING, $value); |
|
972 | + \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('[tx_dlf_list->__set(' . $var . ', [data])] There is no setter function for property "' . $var . '"', $this->extKey, SYSLOG_SEVERITY_WARNING, $value); |
|
973 | 973 | |
974 | 974 | } |
975 | 975 | |
@@ -991,7 +991,7 @@ discard block |
||
991 | 991 | */ |
992 | 992 | public function __sleep() { |
993 | 993 | |
994 | - return array ('elements', 'metadata'); |
|
994 | + return array('elements', 'metadata'); |
|
995 | 995 | |
996 | 996 | } |
997 | 997 |
@@ -89,7 +89,8 @@ discard block |
||
89 | 89 | * |
90 | 90 | * @return void |
91 | 91 | */ |
92 | - public function add(array $elements, $position = -1) { |
|
92 | + public function add(array $elements, $position = -1) |
|
93 | + { |
|
93 | 94 | |
94 | 95 | $position = \TYPO3\CMS\Core\Utility\MathUtility::forceIntegerInRange($position, 0, $this->count, $this->count); |
95 | 96 | |
@@ -111,7 +112,8 @@ discard block |
||
111 | 112 | * |
112 | 113 | * @return integer The number of elements in the list |
113 | 114 | */ |
114 | - public function count() { |
|
115 | + public function count() |
|
116 | + { |
|
115 | 117 | |
116 | 118 | return $this->count; |
117 | 119 | |
@@ -125,7 +127,8 @@ discard block |
||
125 | 127 | * |
126 | 128 | * @return array The current element |
127 | 129 | */ |
128 | - public function current() { |
|
130 | + public function current() |
|
131 | + { |
|
129 | 132 | |
130 | 133 | if ($this->valid()) { |
131 | 134 | |
@@ -154,7 +157,8 @@ discard block |
||
154 | 157 | * |
155 | 158 | * @return mixed The element's full record |
156 | 159 | */ |
157 | - protected function getRecord($element) { |
|
160 | + protected function getRecord($element) |
|
161 | + { |
|
158 | 162 | |
159 | 163 | if (is_array($element) && array_keys($element) == array ('u', 'h', 's', 'p')) { |
160 | 164 | |
@@ -378,7 +382,8 @@ discard block |
||
378 | 382 | * |
379 | 383 | * @return integer The current position |
380 | 384 | */ |
381 | - public function key() { |
|
385 | + public function key() |
|
386 | + { |
|
382 | 387 | |
383 | 388 | return $this->position; |
384 | 389 | |
@@ -396,7 +401,8 @@ discard block |
||
396 | 401 | * |
397 | 402 | * @return void |
398 | 403 | */ |
399 | - public function move($position, $steps) { |
|
404 | + public function move($position, $steps) |
|
405 | + { |
|
400 | 406 | |
401 | 407 | // Save parameters for logging purposes. |
402 | 408 | $_position = $position; |
@@ -448,7 +454,8 @@ discard block |
||
448 | 454 | * |
449 | 455 | * @return void |
450 | 456 | */ |
451 | - public function moveUp($position) { |
|
457 | + public function moveUp($position) |
|
458 | + { |
|
452 | 459 | |
453 | 460 | $this->move($position, -1); |
454 | 461 | |
@@ -463,7 +470,8 @@ discard block |
||
463 | 470 | * |
464 | 471 | * @return void |
465 | 472 | */ |
466 | - public function moveDown($position) { |
|
473 | + public function moveDown($position) |
|
474 | + { |
|
467 | 475 | |
468 | 476 | $this->move($position, 1); |
469 | 477 | |
@@ -477,7 +485,8 @@ discard block |
||
477 | 485 | * |
478 | 486 | * @return void |
479 | 487 | */ |
480 | - public function next() { |
|
488 | + public function next() |
|
489 | + { |
|
481 | 490 | |
482 | 491 | $this->position++; |
483 | 492 | |
@@ -493,7 +502,8 @@ discard block |
||
493 | 502 | * |
494 | 503 | * @return boolean Does the given offset exist? |
495 | 504 | */ |
496 | - public function offsetExists($offset) { |
|
505 | + public function offsetExists($offset) |
|
506 | + { |
|
497 | 507 | |
498 | 508 | return isset($this->elements[$offset]); |
499 | 509 | |
@@ -509,7 +519,8 @@ discard block |
||
509 | 519 | * |
510 | 520 | * @return array The element at the given offset |
511 | 521 | */ |
512 | - public function offsetGet($offset) { |
|
522 | + public function offsetGet($offset) |
|
523 | + { |
|
513 | 524 | |
514 | 525 | if ($this->offsetExists($offset)) { |
515 | 526 | |
@@ -540,7 +551,8 @@ discard block |
||
540 | 551 | * |
541 | 552 | * @return void |
542 | 553 | */ |
543 | - public function offsetSet($offset, $value) { |
|
554 | + public function offsetSet($offset, $value) |
|
555 | + { |
|
544 | 556 | |
545 | 557 | if (\TYPO3\CMS\Core\Utility\MathUtility::canBeInterpretedAsInteger($offset)) { |
546 | 558 | |
@@ -568,7 +580,8 @@ discard block |
||
568 | 580 | * |
569 | 581 | * @return array The removed element |
570 | 582 | */ |
571 | - public function remove($position) { |
|
583 | + public function remove($position) |
|
584 | + { |
|
572 | 585 | |
573 | 586 | // Save parameter for logging purposes. |
574 | 587 | $_position = $position; |
@@ -606,7 +619,8 @@ discard block |
||
606 | 619 | * |
607 | 620 | * @return array The indizes of the removed elements |
608 | 621 | */ |
609 | - public function removeRange($position, $length) { |
|
622 | + public function removeRange($position, $length) |
|
623 | + { |
|
610 | 624 | |
611 | 625 | // Save parameter for logging purposes. |
612 | 626 | $_position = $position; |
@@ -637,7 +651,8 @@ discard block |
||
637 | 651 | * |
638 | 652 | * @return void |
639 | 653 | */ |
640 | - public function reset() { |
|
654 | + public function reset() |
|
655 | + { |
|
641 | 656 | |
642 | 657 | $this->elements = array (); |
643 | 658 | |
@@ -659,7 +674,8 @@ discard block |
||
659 | 674 | * |
660 | 675 | * @return void |
661 | 676 | */ |
662 | - public function rewind() { |
|
677 | + public function rewind() |
|
678 | + { |
|
663 | 679 | |
664 | 680 | $this->position = 0; |
665 | 681 | |
@@ -674,7 +690,8 @@ discard block |
||
674 | 690 | * |
675 | 691 | * @return void |
676 | 692 | */ |
677 | - public function save($pid = 0) { |
|
693 | + public function save($pid = 0) |
|
694 | + { |
|
678 | 695 | |
679 | 696 | $pid = max(intval($pid), 0); |
680 | 697 | |
@@ -698,7 +715,8 @@ discard block |
||
698 | 715 | * |
699 | 716 | * @return boolean TRUE on success or FALSE on failure |
700 | 717 | */ |
701 | - protected function solrConnect() { |
|
718 | + protected function solrConnect() |
|
719 | + { |
|
702 | 720 | |
703 | 721 | // Get Solr instance. |
704 | 722 | if (!$this->solr) { |
@@ -747,7 +765,8 @@ discard block |
||
747 | 765 | * |
748 | 766 | * @return void |
749 | 767 | */ |
750 | - public function sort($by, $asc = TRUE) { |
|
768 | + public function sort($by, $asc = TRUE) |
|
769 | + { |
|
751 | 770 | |
752 | 771 | $newOrder = array (); |
753 | 772 | |
@@ -809,7 +828,8 @@ discard block |
||
809 | 828 | * |
810 | 829 | * @return void |
811 | 830 | */ |
812 | - public function offsetUnset($offset) { |
|
831 | + public function offsetUnset($offset) |
|
832 | + { |
|
813 | 833 | |
814 | 834 | unset ($this->elements[$offset]); |
815 | 835 | |
@@ -828,7 +848,8 @@ discard block |
||
828 | 848 | * |
829 | 849 | * @return boolean Is the current list position valid? |
830 | 850 | */ |
831 | - public function valid() { |
|
851 | + public function valid() |
|
852 | + { |
|
832 | 853 | |
833 | 854 | return isset($this->elements[$this->position]); |
834 | 855 | |
@@ -841,7 +862,8 @@ discard block |
||
841 | 862 | * |
842 | 863 | * @return array The list's metadata |
843 | 864 | */ |
844 | - protected function _getMetadata() { |
|
865 | + protected function _getMetadata() |
|
866 | + { |
|
845 | 867 | |
846 | 868 | return $this->metadata; |
847 | 869 | |
@@ -856,7 +878,8 @@ discard block |
||
856 | 878 | * |
857 | 879 | * @return void |
858 | 880 | */ |
859 | - protected function _setMetadata(array $metadata = array ()) { |
|
881 | + protected function _setMetadata(array $metadata = array ()) |
|
882 | + { |
|
860 | 883 | |
861 | 884 | $this->metadata = $metadata; |
862 | 885 | |
@@ -872,7 +895,8 @@ discard block |
||
872 | 895 | * |
873 | 896 | * @return void |
874 | 897 | */ |
875 | - public function __construct(array $elements = array (), array $metadata = array ()) { |
|
898 | + public function __construct(array $elements = array (), array $metadata = array ()) |
|
899 | + { |
|
876 | 900 | |
877 | 901 | if (empty($elements) && empty($metadata)) { |
878 | 902 | |
@@ -918,7 +942,9 @@ discard block |
||
918 | 942 | * |
919 | 943 | * @return void |
920 | 944 | */ |
921 | - protected function __clone() {} |
|
945 | + protected function __clone() |
|
946 | + { |
|
947 | +} |
|
922 | 948 | |
923 | 949 | /** |
924 | 950 | * This magic method is called each time an invisible property is referenced from the object |
@@ -929,7 +955,8 @@ discard block |
||
929 | 955 | * |
930 | 956 | * @return mixed Value of $this->$var |
931 | 957 | */ |
932 | - public function __get($var) { |
|
958 | + public function __get($var) |
|
959 | + { |
|
933 | 960 | |
934 | 961 | $method = '_get'.ucfirst($var); |
935 | 962 | |
@@ -961,7 +988,8 @@ discard block |
||
961 | 988 | * |
962 | 989 | * @return void |
963 | 990 | */ |
964 | - public function __set($var, $value) { |
|
991 | + public function __set($var, $value) |
|
992 | + { |
|
965 | 993 | |
966 | 994 | $method = '_set'.ucfirst($var); |
967 | 995 | |
@@ -989,7 +1017,8 @@ discard block |
||
989 | 1017 | * |
990 | 1018 | * @return array Properties to be serialized |
991 | 1019 | */ |
992 | - public function __sleep() { |
|
1020 | + public function __sleep() |
|
1021 | + { |
|
993 | 1022 | |
994 | 1023 | return array ('elements', 'metadata'); |
995 | 1024 | |
@@ -1003,7 +1032,8 @@ discard block |
||
1003 | 1032 | * |
1004 | 1033 | * @return void |
1005 | 1034 | */ |
1006 | - public function __wakeup() { |
|
1035 | + public function __wakeup() |
|
1036 | + { |
|
1007 | 1037 | |
1008 | 1038 | $this->count = count($this->elements); |
1009 | 1039 |
@@ -17,7 +17,8 @@ discard block |
||
17 | 17 | * @subpackage tx_dlf |
18 | 18 | * @access public |
19 | 19 | */ |
20 | -class tx_dlf_teihdr implements tx_dlf_format { |
|
20 | +class tx_dlf_teihdr implements tx_dlf_format |
|
21 | +{ |
|
21 | 22 | |
22 | 23 | /** |
23 | 24 | * This extracts the essential TEIHDR metadata from XML |
@@ -29,7 +30,8 @@ discard block |
||
29 | 30 | * |
30 | 31 | * @return void |
31 | 32 | */ |
32 | - public function extractMetadata(SimpleXMLElement $xml, array &$metadata) { |
|
33 | + public function extractMetadata(SimpleXMLElement $xml, array &$metadata) |
|
34 | + { |
|
33 | 35 | |
34 | 36 | $xml->registerXPathNamespace('teihdr', 'http://www.tei-c.org/ns/1.0'); |
35 | 37 |
@@ -57,7 +57,7 @@ discard block |
||
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 | |
@@ -97,7 +97,7 @@ discard block |
||
97 | 97 | |
98 | 98 | // Append "valueURI" to name using Unicode unit separator. |
99 | 99 | if (isset($authors[$i]['valueURI'])) { |
100 | - $metadata['author'][$i] .= chr(31).(string) $authors[$i]['valueURI']; |
|
100 | + $metadata['author'][$i] .= chr(31) . (string) $authors[$i]['valueURI']; |
|
101 | 101 | } |
102 | 102 | |
103 | 103 | } |
@@ -17,7 +17,8 @@ discard block |
||
17 | 17 | * @subpackage tx_dlf |
18 | 18 | * @access public |
19 | 19 | */ |
20 | -class tx_dlf_mods implements tx_dlf_format { |
|
20 | +class tx_dlf_mods implements tx_dlf_format |
|
21 | +{ |
|
21 | 22 | |
22 | 23 | /** |
23 | 24 | * This extracts the essential MODS metadata from XML |
@@ -29,7 +30,8 @@ discard block |
||
29 | 30 | * |
30 | 31 | * @return void |
31 | 32 | */ |
32 | - public function extractMetadata(SimpleXMLElement $xml, array &$metadata) { |
|
33 | + public function extractMetadata(SimpleXMLElement $xml, array &$metadata) |
|
34 | + { |
|
33 | 35 | |
34 | 36 | $xml->registerXPathNamespace('mods', 'http://www.loc.gov/mods/v3'); |
35 | 37 |
@@ -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,16 +87,16 @@ discard block |
||
87 | 87 | * @var array |
88 | 88 | * @access protected |
89 | 89 | */ |
90 | - protected $formats = array ( |
|
91 | - 'OAI' => array ( |
|
90 | + protected $formats = array( |
|
91 | + 'OAI' => array( |
|
92 | 92 | 'rootElement' => 'OAI-PMH', |
93 | 93 | 'namespaceURI' => 'http://www.openarchives.org/OAI/2.0/', |
94 | 94 | ), |
95 | - 'METS' => array ( |
|
95 | + 'METS' => array( |
|
96 | 96 | 'rootElement' => 'mets', |
97 | 97 | 'namespaceURI' => 'http://www.loc.gov/METS/', |
98 | 98 | ), |
99 | - 'XLINK' => array ( |
|
99 | + 'XLINK' => array( |
|
100 | 100 | 'rootElement' => 'xlink', |
101 | 101 | 'namespaceURI' => 'http://www.w3.org/1999/xlink', |
102 | 102 | ) |
@@ -125,7 +125,7 @@ discard block |
||
125 | 125 | * @var array |
126 | 126 | * @access protected |
127 | 127 | */ |
128 | - protected $lastSearchedPhysicalPage = array ('logicalPage' => NULL, 'physicalPage' => NULL); |
|
128 | + protected $lastSearchedPhysicalPage = array('logicalPage' => NULL, 'physicalPage' => NULL); |
|
129 | 129 | |
130 | 130 | /** |
131 | 131 | * This holds the documents location |
@@ -141,7 +141,7 @@ discard block |
||
141 | 141 | * @var array |
142 | 142 | * @access protected |
143 | 143 | */ |
144 | - protected $logicalUnits = array (); |
|
144 | + protected $logicalUnits = array(); |
|
145 | 145 | |
146 | 146 | /** |
147 | 147 | * This holds the documents' parsed metadata array with their corresponding structMap//div's ID as array key |
@@ -149,7 +149,7 @@ discard block |
||
149 | 149 | * @var array |
150 | 150 | * @access protected |
151 | 151 | */ |
152 | - protected $metadataArray = array (); |
|
152 | + protected $metadataArray = array(); |
|
153 | 153 | |
154 | 154 | /** |
155 | 155 | * Is the metadata array loaded? |
@@ -190,7 +190,7 @@ discard block |
||
190 | 190 | * @var array |
191 | 191 | * @access protected |
192 | 192 | */ |
193 | - protected $physicalStructure = array (); |
|
193 | + protected $physicalStructure = array(); |
|
194 | 194 | |
195 | 195 | /** |
196 | 196 | * This holds the physical structure metadata |
@@ -198,7 +198,7 @@ discard block |
||
198 | 198 | * @var array |
199 | 199 | * @access protected |
200 | 200 | */ |
201 | - protected $physicalStructureInfo = array (); |
|
201 | + protected $physicalStructureInfo = array(); |
|
202 | 202 | |
203 | 203 | /** |
204 | 204 | * Is the physical structure loaded? |
@@ -223,7 +223,7 @@ discard block |
||
223 | 223 | * @var array |
224 | 224 | * @access protected |
225 | 225 | */ |
226 | - protected $rawTextArray = array (); |
|
226 | + protected $rawTextArray = array(); |
|
227 | 227 | |
228 | 228 | /** |
229 | 229 | * Is the document instantiated successfully? |
@@ -247,7 +247,7 @@ discard block |
||
247 | 247 | * @var array (tx_dlf_document) |
248 | 248 | * @access protected |
249 | 249 | */ |
250 | - protected static $registry = array (); |
|
250 | + protected static $registry = array(); |
|
251 | 251 | |
252 | 252 | /** |
253 | 253 | * This holds the UID of the root document or zero if not multi-volumed |
@@ -272,7 +272,7 @@ discard block |
||
272 | 272 | * @var array |
273 | 273 | * @access protected |
274 | 274 | */ |
275 | - protected $smLinks = array ('l2p' => array (), 'p2l' => array ()); |
|
275 | + protected $smLinks = array('l2p' => array(), 'p2l' => array()); |
|
276 | 276 | |
277 | 277 | /** |
278 | 278 | * Are the smLinks loaded? |
@@ -289,7 +289,7 @@ discard block |
||
289 | 289 | * @var array |
290 | 290 | * @access protected |
291 | 291 | */ |
292 | - protected $tableOfContents = array (); |
|
292 | + protected $tableOfContents = array(); |
|
293 | 293 | |
294 | 294 | /** |
295 | 295 | * Is the table of contents loaded? |
@@ -373,7 +373,7 @@ discard block |
||
373 | 373 | public static function clearRegistry() { |
374 | 374 | |
375 | 375 | // Reset registry array. |
376 | - self::$registry = array (); |
|
376 | + self::$registry = array(); |
|
377 | 377 | |
378 | 378 | } |
379 | 379 | |
@@ -388,7 +388,7 @@ discard block |
||
388 | 388 | */ |
389 | 389 | public function getFileLocation($id) { |
390 | 390 | |
391 | - if (!empty($id) && ($location = $this->mets->xpath('./mets:fileSec/mets:fileGrp/mets:file[@ID="'.$id.'"]/mets:FLocat[@LOCTYPE="URL"]'))) { |
|
391 | + if (!empty($id) && ($location = $this->mets->xpath('./mets:fileSec/mets:fileGrp/mets:file[@ID="' . $id . '"]/mets:FLocat[@LOCTYPE="URL"]'))) { |
|
392 | 392 | |
393 | 393 | return (string) $location[0]->attributes('http://www.w3.org/1999/xlink')->href; |
394 | 394 | |
@@ -396,7 +396,7 @@ discard block |
||
396 | 396 | |
397 | 397 | if (TYPO3_DLOG) { |
398 | 398 | |
399 | - \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('[tx_dlf_document->getFileLocation('.$id.')] There is no file node with @ID "'.$id.'"', self::$extKey, SYSLOG_SEVERITY_WARNING); |
|
399 | + \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('[tx_dlf_document->getFileLocation(' . $id . ')] There is no file node with @ID "' . $id . '"', self::$extKey, SYSLOG_SEVERITY_WARNING); |
|
400 | 400 | |
401 | 401 | } |
402 | 402 | |
@@ -417,7 +417,7 @@ discard block |
||
417 | 417 | */ |
418 | 418 | public function getFileMimeType($id) { |
419 | 419 | |
420 | - if (!empty($id) && ($mimetype = $this->mets->xpath('./mets:fileSec/mets:fileGrp/mets:file[@ID="'.$id.'"]/@MIMETYPE'))) { |
|
420 | + if (!empty($id) && ($mimetype = $this->mets->xpath('./mets:fileSec/mets:fileGrp/mets:file[@ID="' . $id . '"]/@MIMETYPE'))) { |
|
421 | 421 | |
422 | 422 | return (string) $mimetype[0]; |
423 | 423 | |
@@ -425,7 +425,7 @@ discard block |
||
425 | 425 | |
426 | 426 | if (TYPO3_DLOG) { |
427 | 427 | |
428 | - \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('[tx_dlf_document->getFileMimeType('.$id.')] There is no file node with @ID "'.$id.'" or no MIME type specified', self::$extKey, SYSLOG_SEVERITY_WARNING); |
|
428 | + \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('[tx_dlf_document->getFileMimeType(' . $id . ')] There is no file node with @ID "' . $id . '" or no MIME type specified', self::$extKey, SYSLOG_SEVERITY_WARNING); |
|
429 | 429 | |
430 | 430 | } |
431 | 431 | |
@@ -531,7 +531,7 @@ discard block |
||
531 | 531 | */ |
532 | 532 | public function getLogicalStructure($id, $recursive = FALSE) { |
533 | 533 | |
534 | - $details = array (); |
|
534 | + $details = array(); |
|
535 | 535 | |
536 | 536 | // Is the requested logical unit already loaded? |
537 | 537 | if (!$recursive && !empty($this->logicalUnits[$id])) { |
@@ -542,7 +542,7 @@ discard block |
||
542 | 542 | } elseif (!empty($id)) { |
543 | 543 | |
544 | 544 | // Get specified logical unit. |
545 | - $divs = $this->mets->xpath('./mets:structMap[@TYPE="LOGICAL"]//mets:div[@ID="'.$id.'"]'); |
|
545 | + $divs = $this->mets->xpath('./mets:structMap[@TYPE="LOGICAL"]//mets:div[@ID="' . $id . '"]'); |
|
546 | 546 | |
547 | 547 | } else { |
548 | 548 | |
@@ -598,7 +598,7 @@ discard block |
||
598 | 598 | $extConf = unserialize($GLOBALS['TYPO3_CONF_VARS']['EXT']['extConf'][self::$extKey]); |
599 | 599 | |
600 | 600 | // Extract identity information. |
601 | - $details = array (); |
|
601 | + $details = array(); |
|
602 | 602 | |
603 | 603 | $details['id'] = $attributes['ID']; |
604 | 604 | |
@@ -677,7 +677,7 @@ discard block |
||
677 | 677 | } |
678 | 678 | |
679 | 679 | // Get the files this structure element is pointing at. |
680 | - $details['files'] = array (); |
|
680 | + $details['files'] = array(); |
|
681 | 681 | |
682 | 682 | $fileUse = $this->_getFileGrps(); |
683 | 683 | |
@@ -699,7 +699,7 @@ discard block |
||
699 | 699 | // Walk the structure recursively? And are there any children of the current element? |
700 | 700 | if ($recursive && count($structure->children('http://www.loc.gov/METS/')->div)) { |
701 | 701 | |
702 | - $details['children'] = array (); |
|
702 | + $details['children'] = array(); |
|
703 | 703 | |
704 | 704 | foreach ($structure->children('http://www.loc.gov/METS/')->div as $child) { |
705 | 705 | |
@@ -743,11 +743,11 @@ discard block |
||
743 | 743 | |
744 | 744 | if (TYPO3_DLOG) { |
745 | 745 | |
746 | - \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('[tx_dlf_document->getMetadata('.$id.', '.$_cPid.')] Invalid PID "'.$cPid.'" for metadata definitions', self::$extKey, SYSLOG_SEVERITY_ERROR); |
|
746 | + \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('[tx_dlf_document->getMetadata(' . $id . ', ' . $_cPid . ')] Invalid PID "' . $cPid . '" for metadata definitions', self::$extKey, SYSLOG_SEVERITY_ERROR); |
|
747 | 747 | |
748 | 748 | } |
749 | 749 | |
750 | - return array (); |
|
750 | + return array(); |
|
751 | 751 | |
752 | 752 | } |
753 | 753 | |
@@ -759,25 +759,25 @@ discard block |
||
759 | 759 | } |
760 | 760 | |
761 | 761 | // Initialize metadata array with empty values. |
762 | - $metadata = array ( |
|
763 | - 'title' => array (), |
|
764 | - 'title_sorting' => array (), |
|
765 | - 'author' => array (), |
|
766 | - 'place' => array (), |
|
767 | - 'year' => array (), |
|
768 | - 'prod_id' => array (), |
|
769 | - 'record_id' => array (), |
|
770 | - 'opac_id' => array (), |
|
771 | - 'union_id' => array (), |
|
772 | - 'urn' => array (), |
|
773 | - 'purl' => array (), |
|
774 | - 'type' => array (), |
|
775 | - 'volume' => array (), |
|
776 | - 'volume_sorting' => array (), |
|
777 | - 'collection' => array (), |
|
778 | - 'owner' => array (), |
|
779 | - 'mets_label' => array (), |
|
780 | - 'mets_orderlabel' => array (), |
|
762 | + $metadata = array( |
|
763 | + 'title' => array(), |
|
764 | + 'title_sorting' => array(), |
|
765 | + 'author' => array(), |
|
766 | + 'place' => array(), |
|
767 | + 'year' => array(), |
|
768 | + 'prod_id' => array(), |
|
769 | + 'record_id' => array(), |
|
770 | + 'opac_id' => array(), |
|
771 | + 'union_id' => array(), |
|
772 | + 'urn' => array(), |
|
773 | + 'purl' => array(), |
|
774 | + 'type' => array(), |
|
775 | + 'volume' => array(), |
|
776 | + 'volume_sorting' => array(), |
|
777 | + 'collection' => array(), |
|
778 | + 'owner' => array(), |
|
779 | + 'mets_label' => array(), |
|
780 | + 'mets_orderlabel' => array(), |
|
781 | 781 | ); |
782 | 782 | |
783 | 783 | // Get the logical structure node's DMDID. |
@@ -787,7 +787,7 @@ discard block |
||
787 | 787 | |
788 | 788 | } else { |
789 | 789 | |
790 | - $dmdId = $this->mets->xpath('./mets:structMap[@TYPE="LOGICAL"]//mets:div[@ID="'.$id.'"]/@DMDID'); |
|
790 | + $dmdId = $this->mets->xpath('./mets:structMap[@TYPE="LOGICAL"]//mets:div[@ID="' . $id . '"]/@DMDID'); |
|
791 | 791 | |
792 | 792 | $dmdId = (string) $dmdId[0]; |
793 | 793 | |
@@ -816,7 +816,7 @@ discard block |
||
816 | 816 | |
817 | 817 | if (TYPO3_DLOG) { |
818 | 818 | |
819 | - \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('[tx_dlf_document->getMetadata('.$id.', '.$_cPid.')] Invalid class/method "'.$class.'->extractMetadata()" for metadata format "'.$this->dmdSec[$dmdId]['type'].'"', self::$extKey, SYSLOG_SEVERITY_WARNING); |
|
819 | + \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('[tx_dlf_document->getMetadata(' . $id . ', ' . $_cPid . ')] Invalid class/method "' . $class . '->extractMetadata()" for metadata format "' . $this->dmdSec[$dmdId]['type'] . '"', self::$extKey, SYSLOG_SEVERITY_WARNING); |
|
820 | 820 | |
821 | 821 | } |
822 | 822 | |
@@ -828,24 +828,24 @@ discard block |
||
828 | 828 | |
829 | 829 | if (TYPO3_DLOG) { |
830 | 830 | |
831 | - \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('[tx_dlf_document->getMetadata('.$id.', '.$_cPid.')] Unsupported metadata format "'.$this->dmdSec[$dmdId]['type'].'" in dmdSec with @ID "'.$dmdId.'"', self::$extKey, SYSLOG_SEVERITY_WARNING); |
|
831 | + \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('[tx_dlf_document->getMetadata(' . $id . ', ' . $_cPid . ')] Unsupported metadata format "' . $this->dmdSec[$dmdId]['type'] . '" in dmdSec with @ID "' . $dmdId . '"', self::$extKey, SYSLOG_SEVERITY_WARNING); |
|
832 | 832 | |
833 | 833 | } |
834 | 834 | |
835 | - return array (); |
|
835 | + return array(); |
|
836 | 836 | |
837 | 837 | } |
838 | 838 | |
839 | 839 | // Get the structure's type. |
840 | 840 | if (!empty($this->logicalUnits[$id])) { |
841 | 841 | |
842 | - $metadata['type'] = array ($this->logicalUnits[$id]['type']); |
|
842 | + $metadata['type'] = array($this->logicalUnits[$id]['type']); |
|
843 | 843 | |
844 | 844 | } else { |
845 | 845 | |
846 | - $struct = $this->mets->xpath('./mets:structMap[@TYPE="LOGICAL"]//mets:div[@ID="'.$id.'"]/@TYPE'); |
|
846 | + $struct = $this->mets->xpath('./mets:structMap[@TYPE="LOGICAL"]//mets:div[@ID="' . $id . '"]/@TYPE'); |
|
847 | 847 | |
848 | - $metadata['type'] = array ((string) $struct[0]); |
|
848 | + $metadata['type'] = array((string) $struct[0]); |
|
849 | 849 | |
850 | 850 | } |
851 | 851 | |
@@ -853,7 +853,7 @@ discard block |
||
853 | 853 | $result = $GLOBALS['TYPO3_DB']->exec_SELECTquery( |
854 | 854 | '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', |
855 | 855 | 'tx_dlf_metadata,tx_dlf_metadataformat,tx_dlf_formats', |
856 | - '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'), |
|
856 | + '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'), |
|
857 | 857 | '', |
858 | 858 | '', |
859 | 859 | '' |
@@ -874,7 +874,7 @@ discard block |
||
874 | 874 | |
875 | 875 | if ($values instanceof DOMNodeList && $values->length > 0) { |
876 | 876 | |
877 | - $metadata[$resArray['index_name']] = array (); |
|
877 | + $metadata[$resArray['index_name']] = array(); |
|
878 | 878 | |
879 | 879 | foreach ($values as $value) { |
880 | 880 | |
@@ -884,7 +884,7 @@ discard block |
||
884 | 884 | |
885 | 885 | } elseif (!($values instanceof DOMNodeList)) { |
886 | 886 | |
887 | - $metadata[$resArray['index_name']] = array (trim((string) $values)); |
|
887 | + $metadata[$resArray['index_name']] = array(trim((string) $values)); |
|
888 | 888 | |
889 | 889 | } |
890 | 890 | |
@@ -896,7 +896,7 @@ discard block |
||
896 | 896 | // These empty fields are then shown within the search facets as 'empty'. |
897 | 897 | if (empty($metadata[$resArray['index_name']][0]) && strlen($resArray['default_value']) > 0) { |
898 | 898 | |
899 | - $metadata[$resArray['index_name']] = array ($resArray['default_value']); |
|
899 | + $metadata[$resArray['index_name']] = array($resArray['default_value']); |
|
900 | 900 | |
901 | 901 | } |
902 | 902 | |
@@ -907,19 +907,19 @@ discard block |
||
907 | 907 | |
908 | 908 | if ($values instanceof DOMNodeList && $values->length > 0) { |
909 | 909 | |
910 | - $metadata[$resArray['index_name'].'_sorting'][0] = trim((string) $values->item(0)->nodeValue); |
|
910 | + $metadata[$resArray['index_name'] . '_sorting'][0] = trim((string) $values->item(0)->nodeValue); |
|
911 | 911 | |
912 | 912 | } elseif (!($values instanceof DOMNodeList)) { |
913 | 913 | |
914 | - $metadata[$resArray['index_name'].'_sorting'][0] = trim((string) $values); |
|
914 | + $metadata[$resArray['index_name'] . '_sorting'][0] = trim((string) $values); |
|
915 | 915 | |
916 | 916 | } |
917 | 917 | |
918 | 918 | } |
919 | 919 | |
920 | - if (empty($metadata[$resArray['index_name'].'_sorting'][0])) { |
|
920 | + if (empty($metadata[$resArray['index_name'] . '_sorting'][0])) { |
|
921 | 921 | |
922 | - $metadata[$resArray['index_name'].'_sorting'][0] = $metadata[$resArray['index_name']][0]; |
|
922 | + $metadata[$resArray['index_name'] . '_sorting'][0] = $metadata[$resArray['index_name']][0]; |
|
923 | 923 | |
924 | 924 | } |
925 | 925 | |
@@ -944,7 +944,7 @@ discard block |
||
944 | 944 | 'tx_dlf_documents', |
945 | 945 | 'tx_dlf_relations', |
946 | 946 | 'tx_dlf_collections', |
947 | - 'AND tx_dlf_collections.pid='.intval($cPid).' AND tx_dlf_documents.uid='.intval($this->uid).' AND tx_dlf_relations.ident='.$GLOBALS['TYPO3_DB']->fullQuoteStr('docs_colls', 'tx_dlf_relations').' AND tx_dlf_collections.sys_language_uid IN (-1,0)'.tx_dlf_helper::whereClause('tx_dlf_documents').tx_dlf_helper::whereClause('tx_dlf_collections'), |
|
947 | + 'AND tx_dlf_collections.pid=' . intval($cPid) . ' AND tx_dlf_documents.uid=' . intval($this->uid) . ' AND tx_dlf_relations.ident=' . $GLOBALS['TYPO3_DB']->fullQuoteStr('docs_colls', 'tx_dlf_relations') . ' AND tx_dlf_collections.sys_language_uid IN (-1,0)' . tx_dlf_helper::whereClause('tx_dlf_documents') . tx_dlf_helper::whereClause('tx_dlf_collections'), |
|
948 | 948 | 'tx_dlf_collections.index_name', |
949 | 949 | '', |
950 | 950 | '' |
@@ -965,7 +965,7 @@ discard block |
||
965 | 965 | } else { |
966 | 966 | |
967 | 967 | // There is no dmdSec for this structure node. |
968 | - return array (); |
|
968 | + return array(); |
|
969 | 969 | |
970 | 970 | } |
971 | 971 | |
@@ -1074,7 +1074,7 @@ discard block |
||
1074 | 1074 | |
1075 | 1075 | if (TYPO3_DLOG) { |
1076 | 1076 | |
1077 | - \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('[tx_dlf_document->getRawText('.$id.')] Invalid structure node @ID "'.$id.'"', self::$extKey, SYSLOG_SEVERITY_WARNING); |
|
1077 | + \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('[tx_dlf_document->getRawText(' . $id . ')] Invalid structure node @ID "' . $id . '"', self::$extKey, SYSLOG_SEVERITY_WARNING); |
|
1078 | 1078 | |
1079 | 1079 | } |
1080 | 1080 | |
@@ -1100,7 +1100,7 @@ discard block |
||
1100 | 1100 | |
1101 | 1101 | if (TYPO3_DLOG) { |
1102 | 1102 | |
1103 | - \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('[tx_dlf_document->getRawText('.$id.')] Invalid class/method "'.$class.'->getRawText()" for text format "'.$textFormat.'"', self::$extKey, SYSLOG_SEVERITY_WARNING); |
|
1103 | + \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('[tx_dlf_document->getRawText(' . $id . ')] Invalid class/method "' . $class . '->getRawText()" for text format "' . $textFormat . '"', self::$extKey, SYSLOG_SEVERITY_WARNING); |
|
1104 | 1104 | |
1105 | 1105 | } |
1106 | 1106 | |
@@ -1112,7 +1112,7 @@ discard block |
||
1112 | 1112 | |
1113 | 1113 | if (TYPO3_DLOG) { |
1114 | 1114 | |
1115 | - \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('[tx_dlf_document->getRawText('.$id.')] Unsupported text format "'.$textFormat.'" in physical node with @ID "'.$id.'"', self::$extKey, SYSLOG_SEVERITY_WARNING); |
|
1115 | + \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('[tx_dlf_document->getRawText(' . $id . ')] Unsupported text format "' . $textFormat . '" in physical node with @ID "' . $id . '"', self::$extKey, SYSLOG_SEVERITY_WARNING); |
|
1116 | 1116 | |
1117 | 1117 | } |
1118 | 1118 | |
@@ -1149,7 +1149,7 @@ discard block |
||
1149 | 1149 | $result = $GLOBALS['TYPO3_DB']->exec_SELECTquery( |
1150 | 1150 | 'tx_dlf_documents.title,tx_dlf_documents.partof', |
1151 | 1151 | 'tx_dlf_documents', |
1152 | - 'tx_dlf_documents.uid='.$uid.tx_dlf_helper::whereClause('tx_dlf_documents'), |
|
1152 | + 'tx_dlf_documents.uid=' . $uid . tx_dlf_helper::whereClause('tx_dlf_documents'), |
|
1153 | 1153 | '', |
1154 | 1154 | '', |
1155 | 1155 | '1' |
@@ -1171,7 +1171,7 @@ discard block |
||
1171 | 1171 | |
1172 | 1172 | if (TYPO3_DLOG) { |
1173 | 1173 | |
1174 | - \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('[tx_dlf_document->getTitle('.$_uid.', ['.($recursive ? 'TRUE' : 'FALSE').'])] No document with UID "'.$uid.'" found or document not accessible', self::$extKey, SYSLOG_SEVERITY_WARNING); |
|
1174 | + \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('[tx_dlf_document->getTitle(' . $_uid . ', [' . ($recursive ? 'TRUE' : 'FALSE') . '])] No document with UID "' . $uid . '" found or document not accessible', self::$extKey, SYSLOG_SEVERITY_WARNING); |
|
1175 | 1175 | |
1176 | 1176 | } |
1177 | 1177 | |
@@ -1181,7 +1181,7 @@ discard block |
||
1181 | 1181 | |
1182 | 1182 | if (TYPO3_DLOG) { |
1183 | 1183 | |
1184 | - \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('[tx_dlf_document->getTitle('.$_uid.', ['.($recursive ? 'TRUE' : 'FALSE').'])] Invalid UID "'.$uid.'" for document', self::$extKey, SYSLOG_SEVERITY_ERROR); |
|
1184 | + \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('[tx_dlf_document->getTitle(' . $_uid . ', [' . ($recursive ? 'TRUE' : 'FALSE') . '])] Invalid UID "' . $uid . '" for document', self::$extKey, SYSLOG_SEVERITY_ERROR); |
|
1185 | 1185 | |
1186 | 1186 | } |
1187 | 1187 | |
@@ -1247,7 +1247,7 @@ discard block |
||
1247 | 1247 | |
1248 | 1248 | if (TYPO3_DLOG) { |
1249 | 1249 | |
1250 | - \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('[tx_dlf_document->init()] No METS part found in document with UID "'.$this->uid.'"', self::$extKey, SYSLOG_SEVERITY_ERROR); |
|
1250 | + \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('[tx_dlf_document->init()] No METS part found in document with UID "' . $this->uid . '"', self::$extKey, SYSLOG_SEVERITY_ERROR); |
|
1251 | 1251 | |
1252 | 1252 | } |
1253 | 1253 | |
@@ -1305,7 +1305,7 @@ discard block |
||
1305 | 1305 | |
1306 | 1306 | if (TYPO3_DLOG) { |
1307 | 1307 | |
1308 | - \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('[tx_dlf_document->load('.$location.')] Could not load XML file from "'.$location.'"', self::$extKey, SYSLOG_SEVERITY_ERROR); |
|
1308 | + \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('[tx_dlf_document->load(' . $location . ')] Could not load XML file from "' . $location . '"', self::$extKey, SYSLOG_SEVERITY_ERROR); |
|
1309 | 1309 | |
1310 | 1310 | } |
1311 | 1311 | |
@@ -1315,7 +1315,7 @@ discard block |
||
1315 | 1315 | |
1316 | 1316 | if (TYPO3_DLOG) { |
1317 | 1317 | |
1318 | - \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('[tx_dlf_document->load('.$location.')] Invalid file location "'.$location.'" for document loading', self::$extKey, SYSLOG_SEVERITY_ERROR); |
|
1318 | + \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('[tx_dlf_document->load(' . $location . ')] Invalid file location "' . $location . '" for document loading', self::$extKey, SYSLOG_SEVERITY_ERROR); |
|
1319 | 1319 | |
1320 | 1320 | } |
1321 | 1321 | |
@@ -1340,7 +1340,7 @@ discard block |
||
1340 | 1340 | $result = $GLOBALS['TYPO3_DB']->exec_SELECTquery( |
1341 | 1341 | 'tx_dlf_formats.type AS type,tx_dlf_formats.root AS root,tx_dlf_formats.namespace AS namespace,tx_dlf_formats.class AS class', |
1342 | 1342 | 'tx_dlf_formats', |
1343 | - 'tx_dlf_formats.pid=0'.tx_dlf_helper::whereClause('tx_dlf_formats'), |
|
1343 | + 'tx_dlf_formats.pid=0' . tx_dlf_helper::whereClause('tx_dlf_formats'), |
|
1344 | 1344 | '', |
1345 | 1345 | '', |
1346 | 1346 | '' |
@@ -1349,7 +1349,7 @@ discard block |
||
1349 | 1349 | while ($resArray = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($result)) { |
1350 | 1350 | |
1351 | 1351 | // Update format registry. |
1352 | - $this->formats[$resArray['type']] = array ( |
|
1352 | + $this->formats[$resArray['type']] = array( |
|
1353 | 1353 | 'rootElement' => $resArray['root'], |
1354 | 1354 | 'namespaceURI' => $resArray['namespace'], |
1355 | 1355 | 'class' => $resArray['class'] |
@@ -1389,7 +1389,7 @@ discard block |
||
1389 | 1389 | |
1390 | 1390 | if (TYPO3_DLOG) { |
1391 | 1391 | |
1392 | - \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('[tx_dlf_document->registerNamespaces(['.get_class($obj).'])] Given object is neither a SimpleXMLElement nor a DOMXPath instance', self::$extKey, SYSLOG_SEVERITY_ERROR); |
|
1392 | + \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('[tx_dlf_document->registerNamespaces([' . get_class($obj) . '])] Given object is neither a SimpleXMLElement nor a DOMXPath instance', self::$extKey, SYSLOG_SEVERITY_ERROR); |
|
1393 | 1393 | |
1394 | 1394 | } |
1395 | 1395 | |
@@ -1427,7 +1427,7 @@ discard block |
||
1427 | 1427 | |
1428 | 1428 | if (TYPO3_DLOG) { |
1429 | 1429 | |
1430 | - \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('[tx_dlf_document->save('.$_pid.', '.$_core.')] Saving a document is only allowed in the backend', self::$extKey, SYSLOG_SEVERITY_ERROR); |
|
1430 | + \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('[tx_dlf_document->save(' . $_pid . ', ' . $_core . ')] Saving a document is only allowed in the backend', self::$extKey, SYSLOG_SEVERITY_ERROR); |
|
1431 | 1431 | |
1432 | 1432 | } |
1433 | 1433 | |
@@ -1451,7 +1451,7 @@ discard block |
||
1451 | 1451 | |
1452 | 1452 | if (TYPO3_DLOG) { |
1453 | 1453 | |
1454 | - \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('[tx_dlf_document->save('.$_pid.', '.$_core.')] Invalid PID "'.$pid.'" for document saving', self::$extKey, SYSLOG_SEVERITY_ERROR); |
|
1454 | + \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('[tx_dlf_document->save(' . $_pid . ', ' . $_core . ')] Invalid PID "' . $pid . '" for document saving', self::$extKey, SYSLOG_SEVERITY_ERROR); |
|
1455 | 1455 | |
1456 | 1456 | } |
1457 | 1457 | |
@@ -1477,7 +1477,7 @@ discard block |
||
1477 | 1477 | |
1478 | 1478 | if (TYPO3_DLOG) { |
1479 | 1479 | |
1480 | - \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('[tx_dlf_document->save('.$_pid.', '.$_core.')] No record identifier found to avoid duplication', self::$extKey, SYSLOG_SEVERITY_ERROR); |
|
1480 | + \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('[tx_dlf_document->save(' . $_pid . ', ' . $_core . ')] No record identifier found to avoid duplication', self::$extKey, SYSLOG_SEVERITY_ERROR); |
|
1481 | 1481 | |
1482 | 1482 | } |
1483 | 1483 | |
@@ -1492,7 +1492,7 @@ discard block |
||
1492 | 1492 | $result = $GLOBALS['TYPO3_DB']->exec_SELECTquery( |
1493 | 1493 | 'be_users.uid AS uid', |
1494 | 1494 | 'be_users', |
1495 | - 'username='.$GLOBALS['TYPO3_DB']->fullQuoteStr('_cli_dlf', 'be_users').\TYPO3\CMS\Backend\Utility\BackendUtility::BEenableFields('be_users').\TYPO3\CMS\Backend\Utility\BackendUtility::deleteClause('be_users'), |
|
1495 | + 'username=' . $GLOBALS['TYPO3_DB']->fullQuoteStr('_cli_dlf', 'be_users') . \TYPO3\CMS\Backend\Utility\BackendUtility::BEenableFields('be_users') . \TYPO3\CMS\Backend\Utility\BackendUtility::deleteClause('be_users'), |
|
1496 | 1496 | '', |
1497 | 1497 | '', |
1498 | 1498 | '1' |
@@ -1502,7 +1502,7 @@ discard block |
||
1502 | 1502 | |
1503 | 1503 | if (TYPO3_DLOG) { |
1504 | 1504 | |
1505 | - \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('[tx_dlf_document->save('.$_pid.', '.$_core.')] Backend user "_cli_dlf" not found or disabled', self::$extKey, SYSLOG_SEVERITY_ERROR); |
|
1505 | + \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('[tx_dlf_document->save(' . $_pid . ', ' . $_core . ')] Backend user "_cli_dlf" not found or disabled', self::$extKey, SYSLOG_SEVERITY_ERROR); |
|
1506 | 1506 | |
1507 | 1507 | } |
1508 | 1508 | |
@@ -1514,7 +1514,7 @@ discard block |
||
1514 | 1514 | $result = $GLOBALS['TYPO3_DB']->exec_SELECTquery( |
1515 | 1515 | 'tx_dlf_structures.uid AS uid', |
1516 | 1516 | 'tx_dlf_structures', |
1517 | - 'tx_dlf_structures.pid='.intval($pid).' AND tx_dlf_structures.index_name='.$GLOBALS['TYPO3_DB']->fullQuoteStr($metadata['type'][0], 'tx_dlf_structures').tx_dlf_helper::whereClause('tx_dlf_structures'), |
|
1517 | + 'tx_dlf_structures.pid=' . intval($pid) . ' AND tx_dlf_structures.index_name=' . $GLOBALS['TYPO3_DB']->fullQuoteStr($metadata['type'][0], 'tx_dlf_structures') . tx_dlf_helper::whereClause('tx_dlf_structures'), |
|
1518 | 1518 | '', |
1519 | 1519 | '', |
1520 | 1520 | '1' |
@@ -1528,7 +1528,7 @@ discard block |
||
1528 | 1528 | |
1529 | 1529 | if (TYPO3_DLOG) { |
1530 | 1530 | |
1531 | - \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'), self::$extKey, SYSLOG_SEVERITY_ERROR); |
|
1531 | + \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'), self::$extKey, SYSLOG_SEVERITY_ERROR); |
|
1532 | 1532 | |
1533 | 1533 | } |
1534 | 1534 | |
@@ -1545,12 +1545,12 @@ discard block |
||
1545 | 1545 | } |
1546 | 1546 | |
1547 | 1547 | // Get UIDs for collections. |
1548 | - $collections = array (); |
|
1548 | + $collections = array(); |
|
1549 | 1549 | |
1550 | 1550 | $result = $GLOBALS['TYPO3_DB']->exec_SELECTquery( |
1551 | 1551 | 'tx_dlf_collections.index_name AS index_name,tx_dlf_collections.uid AS uid', |
1552 | 1552 | 'tx_dlf_collections', |
1553 | - 'tx_dlf_collections.pid='.intval($pid).' AND tx_dlf_collections.sys_language_uid IN (-1,0)'.tx_dlf_helper::whereClause('tx_dlf_collections'), |
|
1553 | + 'tx_dlf_collections.pid=' . intval($pid) . ' AND tx_dlf_collections.sys_language_uid IN (-1,0)' . tx_dlf_helper::whereClause('tx_dlf_collections'), |
|
1554 | 1554 | '', |
1555 | 1555 | '', |
1556 | 1556 | '' |
@@ -1574,7 +1574,7 @@ discard block |
||
1574 | 1574 | // Insert new collection. |
1575 | 1575 | $collNewUid = uniqid('NEW'); |
1576 | 1576 | |
1577 | - $collData['tx_dlf_collections'][$collNewUid] = array ( |
|
1577 | + $collData['tx_dlf_collections'][$collNewUid] = array( |
|
1578 | 1578 | 'pid' => $pid, |
1579 | 1579 | 'label' => $collection, |
1580 | 1580 | 'index_name' => $collection, |
@@ -1619,7 +1619,7 @@ discard block |
||
1619 | 1619 | $result = $GLOBALS['TYPO3_DB']->exec_SELECTquery( |
1620 | 1620 | 'tx_dlf_libraries.uid AS uid', |
1621 | 1621 | 'tx_dlf_libraries', |
1622 | - 'tx_dlf_libraries.pid='.intval($pid).' AND tx_dlf_libraries.index_name='.$GLOBALS['TYPO3_DB']->fullQuoteStr($owner, 'tx_dlf_libraries').tx_dlf_helper::whereClause('tx_dlf_libraries'), |
|
1622 | + 'tx_dlf_libraries.pid=' . intval($pid) . ' AND tx_dlf_libraries.index_name=' . $GLOBALS['TYPO3_DB']->fullQuoteStr($owner, 'tx_dlf_libraries') . tx_dlf_helper::whereClause('tx_dlf_libraries'), |
|
1623 | 1623 | '', |
1624 | 1624 | '', |
1625 | 1625 | '1' |
@@ -1634,7 +1634,7 @@ discard block |
||
1634 | 1634 | // Insert new library. |
1635 | 1635 | $libNewUid = uniqid('NEW'); |
1636 | 1636 | |
1637 | - $libData['tx_dlf_libraries'][$libNewUid] = array ( |
|
1637 | + $libData['tx_dlf_libraries'][$libNewUid] = array( |
|
1638 | 1638 | 'pid' => $pid, |
1639 | 1639 | 'label' => $owner, |
1640 | 1640 | 'index_name' => $owner, |
@@ -1676,7 +1676,7 @@ discard block |
||
1676 | 1676 | $partof = 0; |
1677 | 1677 | |
1678 | 1678 | // Get the closest ancestor of the current document which has a MPTR child. |
1679 | - $parentMptr = $this->mets->xpath('./mets:structMap[@TYPE="LOGICAL"]//mets:div[@ID="'.$this->_getToplevelId().'"]/ancestor::mets:div[./mets:mptr][1]/mets:mptr'); |
|
1679 | + $parentMptr = $this->mets->xpath('./mets:structMap[@TYPE="LOGICAL"]//mets:div[@ID="' . $this->_getToplevelId() . '"]/ancestor::mets:div[./mets:mptr][1]/mets:mptr'); |
|
1680 | 1680 | |
1681 | 1681 | if (!empty($parentMptr[0])) { |
1682 | 1682 | |
@@ -1738,14 +1738,14 @@ discard block |
||
1738 | 1738 | } |
1739 | 1739 | |
1740 | 1740 | // Get metadata for lists and sorting. |
1741 | - $listed = array (); |
|
1741 | + $listed = array(); |
|
1742 | 1742 | |
1743 | - $sortable = array (); |
|
1743 | + $sortable = array(); |
|
1744 | 1744 | |
1745 | 1745 | $result = $GLOBALS['TYPO3_DB']->exec_SELECTquery( |
1746 | 1746 | 'tx_dlf_metadata.index_name AS index_name,tx_dlf_metadata.is_listed AS is_listed,tx_dlf_metadata.is_sortable AS is_sortable', |
1747 | 1747 | 'tx_dlf_metadata', |
1748 | - '(tx_dlf_metadata.is_listed=1 OR tx_dlf_metadata.is_sortable=1) AND tx_dlf_metadata.pid='.intval($pid).tx_dlf_helper::whereClause('tx_dlf_metadata'), |
|
1748 | + '(tx_dlf_metadata.is_listed=1 OR tx_dlf_metadata.is_sortable=1) AND tx_dlf_metadata.pid=' . intval($pid) . tx_dlf_helper::whereClause('tx_dlf_metadata'), |
|
1749 | 1749 | '', |
1750 | 1750 | '', |
1751 | 1751 | '' |
@@ -1772,7 +1772,7 @@ discard block |
||
1772 | 1772 | } |
1773 | 1773 | |
1774 | 1774 | // Fill data array. |
1775 | - $data['tx_dlf_documents'][$this->uid] = array ( |
|
1775 | + $data['tx_dlf_documents'][$this->uid] = array( |
|
1776 | 1776 | 'pid' => $pid, |
1777 | 1777 | $GLOBALS['TCA']['tx_dlf_documents']['ctrl']['enablecolumns']['starttime'] => 0, |
1778 | 1778 | $GLOBALS['TCA']['tx_dlf_documents']['ctrl']['enablecolumns']['endtime'] => 0, |
@@ -1847,7 +1847,7 @@ discard block |
||
1847 | 1847 | |
1848 | 1848 | if (TYPO3_DLOG) { |
1849 | 1849 | |
1850 | - \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('[tx_dlf_document->save('.$_pid.', '.$_core.')] Invalid UID "'.$core.'" for Solr core', self::$extKey, SYSLOG_SEVERITY_NOTICE); |
|
1850 | + \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('[tx_dlf_document->save(' . $_pid . ', ' . $_core . ')] Invalid UID "' . $core . '" for Solr core', self::$extKey, SYSLOG_SEVERITY_NOTICE); |
|
1851 | 1851 | |
1852 | 1852 | } |
1853 | 1853 | |
@@ -1889,23 +1889,23 @@ discard block |
||
1889 | 1889 | |
1890 | 1890 | foreach ($dmdIds as $dmdId) { |
1891 | 1891 | |
1892 | - if ($type = $this->mets->xpath('./mets:dmdSec[@ID="'.(string) $dmdId.'"]/mets:mdWrap[not(@MDTYPE="OTHER")]/@MDTYPE')) { |
|
1892 | + if ($type = $this->mets->xpath('./mets:dmdSec[@ID="' . (string) $dmdId . '"]/mets:mdWrap[not(@MDTYPE="OTHER")]/@MDTYPE')) { |
|
1893 | 1893 | |
1894 | 1894 | if (!empty($this->formats[(string) $type[0]])) { |
1895 | 1895 | |
1896 | 1896 | $type = (string) $type[0]; |
1897 | 1897 | |
1898 | - $xml = $this->mets->xpath('./mets:dmdSec[@ID="'.(string) $dmdId.'"]/mets:mdWrap[@MDTYPE="'.$type.'"]/mets:xmlData/'.strtolower($type).':'.$this->formats[$type]['rootElement']); |
|
1898 | + $xml = $this->mets->xpath('./mets:dmdSec[@ID="' . (string) $dmdId . '"]/mets:mdWrap[@MDTYPE="' . $type . '"]/mets:xmlData/' . strtolower($type) . ':' . $this->formats[$type]['rootElement']); |
|
1899 | 1899 | |
1900 | 1900 | } |
1901 | 1901 | |
1902 | - } elseif ($type = $this->mets->xpath('./mets:dmdSec[@ID="'.(string) $dmdId.'"]/mets:mdWrap[@MDTYPE="OTHER"]/@OTHERMDTYPE')) { |
|
1902 | + } elseif ($type = $this->mets->xpath('./mets:dmdSec[@ID="' . (string) $dmdId . '"]/mets:mdWrap[@MDTYPE="OTHER"]/@OTHERMDTYPE')) { |
|
1903 | 1903 | |
1904 | 1904 | if (!empty($this->formats[(string) $type[0]])) { |
1905 | 1905 | |
1906 | 1906 | $type = (string) $type[0]; |
1907 | 1907 | |
1908 | - $xml = $this->mets->xpath('./mets:dmdSec[@ID="'.(string) $dmdId.'"]/mets:mdWrap[@MDTYPE="OTHER"][@OTHERMDTYPE="'.$type.'"]/mets:xmlData/'.strtolower($type).':'.$this->formats[$type]['rootElement']); |
|
1908 | + $xml = $this->mets->xpath('./mets:dmdSec[@ID="' . (string) $dmdId . '"]/mets:mdWrap[@MDTYPE="OTHER"][@OTHERMDTYPE="' . $type . '"]/mets:xmlData/' . strtolower($type) . ':' . $this->formats[$type]['rootElement']); |
|
1909 | 1909 | |
1910 | 1910 | } |
1911 | 1911 | |
@@ -2053,11 +2053,11 @@ discard block |
||
2053 | 2053 | |
2054 | 2054 | if (TYPO3_DLOG) { |
2055 | 2055 | |
2056 | - \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('[tx_dlf_document->getMetadataArray()] Invalid PID "'.$cPid.'" for metadata definitions', self::$extKey, SYSLOG_SEVERITY_ERROR); |
|
2056 | + \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('[tx_dlf_document->getMetadataArray()] Invalid PID "' . $cPid . '" for metadata definitions', self::$extKey, SYSLOG_SEVERITY_ERROR); |
|
2057 | 2057 | |
2058 | 2058 | } |
2059 | 2059 | |
2060 | - return array (); |
|
2060 | + return array(); |
|
2061 | 2061 | |
2062 | 2062 | } |
2063 | 2063 | |
@@ -2390,7 +2390,7 @@ discard block |
||
2390 | 2390 | |
2391 | 2391 | if (TYPO3_DLOG) { |
2392 | 2392 | |
2393 | - \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('[tx_dlf_document->_getThumbnail()] Invalid PID "'.$cPid.'" for structure definitions', self::$extKey, SYSLOG_SEVERITY_ERROR); |
|
2393 | + \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('[tx_dlf_document->_getThumbnail()] Invalid PID "' . $cPid . '" for structure definitions', self::$extKey, SYSLOG_SEVERITY_ERROR); |
|
2394 | 2394 | |
2395 | 2395 | } |
2396 | 2396 | |
@@ -2425,7 +2425,7 @@ discard block |
||
2425 | 2425 | $result = $GLOBALS['TYPO3_DB']->exec_SELECTquery( |
2426 | 2426 | 'tx_dlf_structures.thumbnail AS thumbnail', |
2427 | 2427 | 'tx_dlf_structures', |
2428 | - 'tx_dlf_structures.pid='.intval($cPid).' AND tx_dlf_structures.index_name='.$GLOBALS['TYPO3_DB']->fullQuoteStr($metadata['type'][0], 'tx_dlf_structures').tx_dlf_helper::whereClause('tx_dlf_structures'), |
|
2428 | + 'tx_dlf_structures.pid=' . intval($cPid) . ' AND tx_dlf_structures.index_name=' . $GLOBALS['TYPO3_DB']->fullQuoteStr($metadata['type'][0], 'tx_dlf_structures') . tx_dlf_helper::whereClause('tx_dlf_structures'), |
|
2429 | 2429 | '', |
2430 | 2430 | '', |
2431 | 2431 | '1' |
@@ -2441,7 +2441,7 @@ discard block |
||
2441 | 2441 | $strctType = tx_dlf_helper::getIndexName($resArray['thumbnail'], 'tx_dlf_structures', $cPid); |
2442 | 2442 | |
2443 | 2443 | // Check if this document has a structure element of the desired type. |
2444 | - $strctIds = $this->mets->xpath('./mets:structMap[@TYPE="LOGICAL"]//mets:div[@TYPE="'.$strctType.'"]/@ID'); |
|
2444 | + $strctIds = $this->mets->xpath('./mets:structMap[@TYPE="LOGICAL"]//mets:div[@TYPE="' . $strctType . '"]/@ID'); |
|
2445 | 2445 | |
2446 | 2446 | if (!empty($strctIds)) { |
2447 | 2447 | |
@@ -2467,7 +2467,7 @@ discard block |
||
2467 | 2467 | |
2468 | 2468 | } elseif (TYPO3_DLOG) { |
2469 | 2469 | |
2470 | - \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('[tx_dlf_document->_getThumbnail()] No structure of type "'.$metadata['type'][0].'" found in database', self::$extKey, SYSLOG_SEVERITY_ERROR); |
|
2470 | + \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('[tx_dlf_document->_getThumbnail()] No structure of type "' . $metadata['type'][0] . '" found in database', self::$extKey, SYSLOG_SEVERITY_ERROR); |
|
2471 | 2471 | |
2472 | 2472 | } |
2473 | 2473 | |
@@ -2579,7 +2579,7 @@ discard block |
||
2579 | 2579 | // Prepare to check database for the requested document. |
2580 | 2580 | if (\TYPO3\CMS\Core\Utility\MathUtility::canBeInterpretedAsInteger($uid)) { |
2581 | 2581 | |
2582 | - $whereClause = 'tx_dlf_documents.uid='.intval($uid).tx_dlf_helper::whereClause('tx_dlf_documents'); |
|
2582 | + $whereClause = 'tx_dlf_documents.uid=' . intval($uid) . tx_dlf_helper::whereClause('tx_dlf_documents'); |
|
2583 | 2583 | |
2584 | 2584 | } else { |
2585 | 2585 | |
@@ -2632,7 +2632,7 @@ discard block |
||
2632 | 2632 | if (!empty($location) && !empty($this->recordId)) { |
2633 | 2633 | |
2634 | 2634 | // Try to match record identifier or location (both should be unique). |
2635 | - $whereClause = '(tx_dlf_documents.location='.$GLOBALS['TYPO3_DB']->fullQuoteStr($location, 'tx_dlf_documents').' OR tx_dlf_documents.record_id='.$GLOBALS['TYPO3_DB']->fullQuoteStr($this->recordId, 'tx_dlf_documents').')'.tx_dlf_helper::whereClause('tx_dlf_documents'); |
|
2635 | + $whereClause = '(tx_dlf_documents.location=' . $GLOBALS['TYPO3_DB']->fullQuoteStr($location, 'tx_dlf_documents') . ' OR tx_dlf_documents.record_id=' . $GLOBALS['TYPO3_DB']->fullQuoteStr($this->recordId, 'tx_dlf_documents') . ')' . tx_dlf_helper::whereClause('tx_dlf_documents'); |
|
2636 | 2636 | |
2637 | 2637 | } else { |
2638 | 2638 | |
@@ -2646,7 +2646,7 @@ discard block |
||
2646 | 2646 | // Check for PID if needed. |
2647 | 2647 | if ($pid) { |
2648 | 2648 | |
2649 | - $whereClause .= ' AND tx_dlf_documents.pid='.intval($pid); |
|
2649 | + $whereClause .= ' AND tx_dlf_documents.pid=' . intval($pid); |
|
2650 | 2650 | |
2651 | 2651 | } |
2652 | 2652 | |
@@ -2703,7 +2703,7 @@ discard block |
||
2703 | 2703 | |
2704 | 2704 | if (TYPO3_DLOG) { |
2705 | 2705 | |
2706 | - \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('[tx_dlf_document->__construct('.$uid.', '.$pid.')] No document with UID "'.$uid.'" found or document not accessible', self::$extKey, SYSLOG_SEVERITY_ERROR); |
|
2706 | + \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('[tx_dlf_document->__construct(' . $uid . ', ' . $pid . ')] No document with UID "' . $uid . '" found or document not accessible', self::$extKey, SYSLOG_SEVERITY_ERROR); |
|
2707 | 2707 | |
2708 | 2708 | } |
2709 | 2709 | |
@@ -2722,13 +2722,13 @@ discard block |
||
2722 | 2722 | */ |
2723 | 2723 | public function __get($var) { |
2724 | 2724 | |
2725 | - $method = '_get'.ucfirst($var); |
|
2725 | + $method = '_get' . ucfirst($var); |
|
2726 | 2726 | |
2727 | 2727 | if (!property_exists($this, $var) || !method_exists($this, $method)) { |
2728 | 2728 | |
2729 | 2729 | if (TYPO3_DLOG) { |
2730 | 2730 | |
2731 | - \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('[tx_dlf_document->__get('.$var.')] There is no getter function for property "'.$var.'"', self::$extKey, SYSLOG_SEVERITY_WARNING); |
|
2731 | + \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('[tx_dlf_document->__get(' . $var . ')] There is no getter function for property "' . $var . '"', self::$extKey, SYSLOG_SEVERITY_WARNING); |
|
2732 | 2732 | |
2733 | 2733 | } |
2734 | 2734 | |
@@ -2754,13 +2754,13 @@ discard block |
||
2754 | 2754 | */ |
2755 | 2755 | public function __set($var, $value) { |
2756 | 2756 | |
2757 | - $method = '_set'.ucfirst($var); |
|
2757 | + $method = '_set' . ucfirst($var); |
|
2758 | 2758 | |
2759 | 2759 | if (!property_exists($this, $var) || !method_exists($this, $method)) { |
2760 | 2760 | |
2761 | 2761 | if (TYPO3_DLOG) { |
2762 | 2762 | |
2763 | - \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('[tx_dlf_document->__set('.$var.', '.$value.')] There is no setter function for property "'.$var.'"', self::$extKey, SYSLOG_SEVERITY_WARNING); |
|
2763 | + \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('[tx_dlf_document->__set(' . $var . ', ' . $value . ')] There is no setter function for property "' . $var . '"', self::$extKey, SYSLOG_SEVERITY_WARNING); |
|
2764 | 2764 | |
2765 | 2765 | } |
2766 | 2766 | |
@@ -2785,7 +2785,7 @@ discard block |
||
2785 | 2785 | // SimpleXMLElement objects can't be serialized, thus save the XML as string for serialization |
2786 | 2786 | $this->asXML = $this->xml->asXML(); |
2787 | 2787 | |
2788 | - return array ('uid', 'pid', 'recordId', 'parentId', 'asXML'); |
|
2788 | + return array('uid', 'pid', 'recordId', 'parentId', 'asXML'); |
|
2789 | 2789 | |
2790 | 2790 | } |
2791 | 2791 |
@@ -18,7 +18,8 @@ discard block |
||
18 | 18 | * @subpackage tx_dlf |
19 | 19 | * @access public |
20 | 20 | */ |
21 | -final class tx_dlf_document { |
|
21 | +final class tx_dlf_document |
|
22 | +{ |
|
22 | 23 | |
23 | 24 | /** |
24 | 25 | * This holds the whole XML file as string for serialization purposes |
@@ -351,7 +352,8 @@ discard block |
||
351 | 352 | * |
352 | 353 | * @return void |
353 | 354 | */ |
354 | - public function addMetadataFromMets(&$metadata, $id) { |
|
355 | + public function addMetadataFromMets(&$metadata, $id) |
|
356 | + { |
|
355 | 357 | $details = $this->getLogicalStructure($id); |
356 | 358 | if (!empty($details)) { |
357 | 359 | $metadata['mets_label'][0] = $details['label']; |
@@ -370,7 +372,8 @@ discard block |
||
370 | 372 | * |
371 | 373 | * @return void |
372 | 374 | */ |
373 | - public static function clearRegistry() { |
|
375 | + public static function clearRegistry() |
|
376 | + { |
|
374 | 377 | |
375 | 378 | // Reset registry array. |
376 | 379 | self::$registry = array (); |
@@ -386,7 +389,8 @@ discard block |
||
386 | 389 | * |
387 | 390 | * @return string The file's location as URL |
388 | 391 | */ |
389 | - public function getFileLocation($id) { |
|
392 | + public function getFileLocation($id) |
|
393 | + { |
|
390 | 394 | |
391 | 395 | if (!empty($id) && ($location = $this->mets->xpath('./mets:fileSec/mets:fileGrp/mets:file[@ID="'.$id.'"]/mets:FLocat[@LOCTYPE="URL"]'))) { |
392 | 396 | |
@@ -415,7 +419,8 @@ discard block |
||
415 | 419 | * |
416 | 420 | * @return string The file's MIME type |
417 | 421 | */ |
418 | - public function getFileMimeType($id) { |
|
422 | + public function getFileMimeType($id) |
|
423 | + { |
|
419 | 424 | |
420 | 425 | if (!empty($id) && ($mimetype = $this->mets->xpath('./mets:fileSec/mets:fileGrp/mets:file[@ID="'.$id.'"]/@MIMETYPE'))) { |
421 | 426 | |
@@ -529,7 +534,8 @@ discard block |
||
529 | 534 | * |
530 | 535 | * @return array Array of the element's id, label, type and physical page indexes/mptr link |
531 | 536 | */ |
532 | - public function getLogicalStructure($id, $recursive = FALSE) { |
|
537 | + public function getLogicalStructure($id, $recursive = FALSE) |
|
538 | + { |
|
533 | 539 | |
534 | 540 | $details = array (); |
535 | 541 | |
@@ -585,7 +591,8 @@ discard block |
||
585 | 591 | * |
586 | 592 | * @return array Array of the element's id, label, type and physical page indexes/mptr link |
587 | 593 | */ |
588 | - protected function getLogicalStructureInfo(SimpleXMLElement $structure, $recursive = FALSE) { |
|
594 | + protected function getLogicalStructureInfo(SimpleXMLElement $structure, $recursive = FALSE) |
|
595 | + { |
|
589 | 596 | |
590 | 597 | // Get attributes. |
591 | 598 | foreach ($structure->attributes() as $attribute => $value) { |
@@ -725,7 +732,8 @@ discard block |
||
725 | 732 | * |
726 | 733 | * @return array The logical structure node's parsed metadata array |
727 | 734 | */ |
728 | - public function getMetadata($id, $cPid = 0) { |
|
735 | + public function getMetadata($id, $cPid = 0) |
|
736 | + { |
|
729 | 737 | |
730 | 738 | // Save parameter for logging purposes. |
731 | 739 | $_cPid = $cPid; |
@@ -982,7 +990,8 @@ discard block |
||
982 | 990 | * |
983 | 991 | * @return integer The physical page number |
984 | 992 | */ |
985 | - public function getPhysicalPage($logicalPage) { |
|
993 | + public function getPhysicalPage($logicalPage) |
|
994 | + { |
|
986 | 995 | |
987 | 996 | if (!empty($this->lastSearchedPhysicalPage['logicalPage']) && $this->lastSearchedPhysicalPage['logicalPage'] == $logicalPage) { |
988 | 997 | |
@@ -1022,7 +1031,8 @@ discard block |
||
1022 | 1031 | * |
1023 | 1032 | * @return string The physical structure node's raw text |
1024 | 1033 | */ |
1025 | - public function getRawText($id) { |
|
1034 | + public function getRawText($id) |
|
1035 | + { |
|
1026 | 1036 | |
1027 | 1037 | $rawText = ''; |
1028 | 1038 | |
@@ -1134,7 +1144,8 @@ discard block |
||
1134 | 1144 | * |
1135 | 1145 | * @return string The title of the document itself or a parent document |
1136 | 1146 | */ |
1137 | - public static function getTitle($uid, $recursive = FALSE) { |
|
1147 | + public static function getTitle($uid, $recursive = FALSE) |
|
1148 | + { |
|
1138 | 1149 | |
1139 | 1150 | // Save parameter for logging purposes. |
1140 | 1151 | $_uid = $uid; |
@@ -1200,7 +1211,8 @@ discard block |
||
1200 | 1211 | * |
1201 | 1212 | * @return array The logical structure node's parsed metadata array |
1202 | 1213 | */ |
1203 | - public function getTitledata($cPid = 0) { |
|
1214 | + public function getTitledata($cPid = 0) |
|
1215 | + { |
|
1204 | 1216 | |
1205 | 1217 | $titledata = $this->getMetadata($this->_getToplevelId(), $cPid); |
1206 | 1218 | |
@@ -1229,7 +1241,8 @@ discard block |
||
1229 | 1241 | * |
1230 | 1242 | * @return void |
1231 | 1243 | */ |
1232 | - protected function init() { |
|
1244 | + protected function init() |
|
1245 | + { |
|
1233 | 1246 | |
1234 | 1247 | // Get METS node from XML file. |
1235 | 1248 | $this->registerNamespaces($this->xml); |
@@ -1264,7 +1277,8 @@ discard block |
||
1264 | 1277 | * |
1265 | 1278 | * @return boolean TRUE on success or FALSE on failure |
1266 | 1279 | */ |
1267 | - protected function load($location) { |
|
1280 | + protected function load($location) |
|
1281 | + { |
|
1268 | 1282 | |
1269 | 1283 | // Load XML file. |
1270 | 1284 | if (\TYPO3\CMS\Core\Utility\GeneralUtility::isValidUrl($location)) { |
@@ -1332,7 +1346,8 @@ discard block |
||
1332 | 1346 | * |
1333 | 1347 | * @return void |
1334 | 1348 | */ |
1335 | - protected function loadFormats() { |
|
1349 | + protected function loadFormats() |
|
1350 | + { |
|
1336 | 1351 | |
1337 | 1352 | if (!$this->formatsLoaded) { |
1338 | 1353 | |
@@ -1372,7 +1387,8 @@ discard block |
||
1372 | 1387 | * |
1373 | 1388 | * @return void |
1374 | 1389 | */ |
1375 | - public function registerNamespaces(&$obj) { |
|
1390 | + public function registerNamespaces(&$obj) |
|
1391 | + { |
|
1376 | 1392 | |
1377 | 1393 | $this->loadFormats(); |
1378 | 1394 | |
@@ -1416,7 +1432,8 @@ discard block |
||
1416 | 1432 | * |
1417 | 1433 | * @return boolean TRUE on success or FALSE on failure |
1418 | 1434 | */ |
1419 | - public function save($pid = 0, $core = 0) { |
|
1435 | + public function save($pid = 0, $core = 0) |
|
1436 | + { |
|
1420 | 1437 | |
1421 | 1438 | // Save parameters for logging purposes. |
1422 | 1439 | $_pid = $pid; |
@@ -1864,7 +1881,8 @@ discard block |
||
1864 | 1881 | * |
1865 | 1882 | * @return integer The PID of the metadata definitions |
1866 | 1883 | */ |
1867 | - protected function _getCPid() { |
|
1884 | + protected function _getCPid() |
|
1885 | + { |
|
1868 | 1886 | |
1869 | 1887 | return $this->cPid; |
1870 | 1888 | |
@@ -1877,7 +1895,8 @@ discard block |
||
1877 | 1895 | * |
1878 | 1896 | * @return array Array of dmdSecs with their IDs as array key |
1879 | 1897 | */ |
1880 | - protected function _getDmdSec() { |
|
1898 | + protected function _getDmdSec() |
|
1899 | + { |
|
1881 | 1900 | |
1882 | 1901 | if (!$this->dmdSecLoaded) { |
1883 | 1902 | |
@@ -1938,7 +1957,8 @@ discard block |
||
1938 | 1957 | * |
1939 | 1958 | * @return array Array of file use groups with file IDs |
1940 | 1959 | */ |
1941 | - protected function _getFileGrps() { |
|
1960 | + protected function _getFileGrps() |
|
1961 | + { |
|
1942 | 1962 | |
1943 | 1963 | if (!$this->fileGrpsLoaded) { |
1944 | 1964 | |
@@ -2011,7 +2031,8 @@ discard block |
||
2011 | 2031 | * |
2012 | 2032 | * @return boolean Are there any fulltext files available? |
2013 | 2033 | */ |
2014 | - protected function _getHasFulltext() { |
|
2034 | + protected function _getHasFulltext() |
|
2035 | + { |
|
2015 | 2036 | |
2016 | 2037 | // Are the fileGrps already loaded? |
2017 | 2038 | if (!$this->fileGrpsLoaded) { |
@@ -2031,7 +2052,8 @@ discard block |
||
2031 | 2052 | * |
2032 | 2053 | * @return string The location of the document |
2033 | 2054 | */ |
2034 | - protected function _getLocation() { |
|
2055 | + protected function _getLocation() |
|
2056 | + { |
|
2035 | 2057 | |
2036 | 2058 | return $this->location; |
2037 | 2059 | |
@@ -2044,7 +2066,8 @@ discard block |
||
2044 | 2066 | * |
2045 | 2067 | * @return array Array of metadata with their corresponding logical structure node ID as key |
2046 | 2068 | */ |
2047 | - protected function _getMetadataArray() { |
|
2069 | + protected function _getMetadataArray() |
|
2070 | + { |
|
2048 | 2071 | |
2049 | 2072 | // Set metadata definitions' PID. |
2050 | 2073 | $cPid = ($this->cPid ? $this->cPid : $this->pid); |
@@ -2092,7 +2115,8 @@ discard block |
||
2092 | 2115 | * |
2093 | 2116 | * @return SimpleXMLElement The XML's METS part as SimpleXMLElement object |
2094 | 2117 | */ |
2095 | - protected function _getMets() { |
|
2118 | + protected function _getMets() |
|
2119 | + { |
|
2096 | 2120 | |
2097 | 2121 | return $this->mets; |
2098 | 2122 | |
@@ -2105,7 +2129,8 @@ discard block |
||
2105 | 2129 | * |
2106 | 2130 | * @return integer The total number of pages and/or tracks |
2107 | 2131 | */ |
2108 | - protected function _getNumPages() { |
|
2132 | + protected function _getNumPages() |
|
2133 | + { |
|
2109 | 2134 | |
2110 | 2135 | $this->_getPhysicalStructure(); |
2111 | 2136 | |
@@ -2120,7 +2145,8 @@ discard block |
||
2120 | 2145 | * |
2121 | 2146 | * @return integer The UID of the parent document or zero if not applicable |
2122 | 2147 | */ |
2123 | - protected function _getParentId() { |
|
2148 | + protected function _getParentId() |
|
2149 | + { |
|
2124 | 2150 | |
2125 | 2151 | return $this->parentId; |
2126 | 2152 | |
@@ -2133,7 +2159,8 @@ discard block |
||
2133 | 2159 | * |
2134 | 2160 | * @return array Array of physical elements' id, type, label and file representations ordered by @ORDER attribute |
2135 | 2161 | */ |
2136 | - protected function _getPhysicalStructure() { |
|
2162 | + protected function _getPhysicalStructure() |
|
2163 | + { |
|
2137 | 2164 | |
2138 | 2165 | // Is there no physical structure array yet? |
2139 | 2166 | if (!$this->physicalStructureLoaded) { |
@@ -2238,7 +2265,8 @@ discard block |
||
2238 | 2265 | * |
2239 | 2266 | * @return array Array of elements' type, label and file representations ordered by @ID attribute |
2240 | 2267 | */ |
2241 | - protected function _getPhysicalStructureInfo() { |
|
2268 | + protected function _getPhysicalStructureInfo() |
|
2269 | + { |
|
2242 | 2270 | |
2243 | 2271 | // Is there no physical structure array yet? |
2244 | 2272 | if (!$this->physicalStructureLoaded) { |
@@ -2259,7 +2287,8 @@ discard block |
||
2259 | 2287 | * |
2260 | 2288 | * @return integer The PID of the document or zero if not in database |
2261 | 2289 | */ |
2262 | - protected function _getPid() { |
|
2290 | + protected function _getPid() |
|
2291 | + { |
|
2263 | 2292 | |
2264 | 2293 | return $this->pid; |
2265 | 2294 | |
@@ -2272,7 +2301,8 @@ discard block |
||
2272 | 2301 | * |
2273 | 2302 | * @return boolean Is the document instantiated successfully? |
2274 | 2303 | */ |
2275 | - protected function _getReady() { |
|
2304 | + protected function _getReady() |
|
2305 | + { |
|
2276 | 2306 | |
2277 | 2307 | return $this->ready; |
2278 | 2308 | |
@@ -2285,7 +2315,8 @@ discard block |
||
2285 | 2315 | * |
2286 | 2316 | * @return mixed The METS file's record identifier |
2287 | 2317 | */ |
2288 | - protected function _getRecordId() { |
|
2318 | + protected function _getRecordId() |
|
2319 | + { |
|
2289 | 2320 | |
2290 | 2321 | return $this->recordId; |
2291 | 2322 | |
@@ -2298,7 +2329,8 @@ discard block |
||
2298 | 2329 | * |
2299 | 2330 | * @return integer The UID of the root document or zero if not applicable |
2300 | 2331 | */ |
2301 | - protected function _getRootId() { |
|
2332 | + protected function _getRootId() |
|
2333 | + { |
|
2302 | 2334 | |
2303 | 2335 | if (!$this->rootIdLoaded) { |
2304 | 2336 | |
@@ -2325,7 +2357,8 @@ discard block |
||
2325 | 2357 | * |
2326 | 2358 | * @return array The links between logical and physical nodes |
2327 | 2359 | */ |
2328 | - protected function _getSmLinks() { |
|
2360 | + protected function _getSmLinks() |
|
2361 | + { |
|
2329 | 2362 | |
2330 | 2363 | if (!$this->smLinksLoaded) { |
2331 | 2364 | |
@@ -2354,7 +2387,8 @@ discard block |
||
2354 | 2387 | * |
2355 | 2388 | * @return array Array of structure nodes' id, label, type and physical page indexes/mptr link with original hierarchy preserved |
2356 | 2389 | */ |
2357 | - protected function _getTableOfContents() { |
|
2390 | + protected function _getTableOfContents() |
|
2391 | + { |
|
2358 | 2392 | |
2359 | 2393 | // Is there no logical structure array yet? |
2360 | 2394 | if (!$this->tableOfContentsLoaded) { |
@@ -2379,7 +2413,8 @@ discard block |
||
2379 | 2413 | * |
2380 | 2414 | * @return string The document's thumbnail location |
2381 | 2415 | */ |
2382 | - protected function _getThumbnail($forceReload = FALSE) { |
|
2416 | + protected function _getThumbnail($forceReload = FALSE) |
|
2417 | + { |
|
2383 | 2418 | |
2384 | 2419 | if (!$this->thumbnailLoaded || $forceReload) { |
2385 | 2420 | |
@@ -2486,7 +2521,8 @@ discard block |
||
2486 | 2521 | * |
2487 | 2522 | * @return string The logical structure node's ID |
2488 | 2523 | */ |
2489 | - protected function _getToplevelId() { |
|
2524 | + protected function _getToplevelId() |
|
2525 | + { |
|
2490 | 2526 | |
2491 | 2527 | if (empty($this->toplevelId)) { |
2492 | 2528 | |
@@ -2532,7 +2568,8 @@ discard block |
||
2532 | 2568 | * |
2533 | 2569 | * @return mixed The UID or the URL of the document |
2534 | 2570 | */ |
2535 | - protected function _getUid() { |
|
2571 | + protected function _getUid() |
|
2572 | + { |
|
2536 | 2573 | |
2537 | 2574 | return $this->uid; |
2538 | 2575 | |
@@ -2547,7 +2584,8 @@ discard block |
||
2547 | 2584 | * |
2548 | 2585 | * @return void |
2549 | 2586 | */ |
2550 | - protected function _setCPid($value) { |
|
2587 | + protected function _setCPid($value) |
|
2588 | + { |
|
2551 | 2589 | |
2552 | 2590 | $this->cPid = max(intval($value), 0); |
2553 | 2591 | |
@@ -2561,7 +2599,9 @@ discard block |
||
2561 | 2599 | * |
2562 | 2600 | * @return void |
2563 | 2601 | */ |
2564 | - protected function __clone() {} |
|
2602 | + protected function __clone() |
|
2603 | + { |
|
2604 | +} |
|
2565 | 2605 | |
2566 | 2606 | /** |
2567 | 2607 | * This is a singleton class, thus the constructor should be private/protected |
@@ -2574,7 +2614,8 @@ discard block |
||
2574 | 2614 | * |
2575 | 2615 | * @return void |
2576 | 2616 | */ |
2577 | - protected function __construct($uid, $pid) { |
|
2617 | + protected function __construct($uid, $pid) |
|
2618 | + { |
|
2578 | 2619 | |
2579 | 2620 | // Prepare to check database for the requested document. |
2580 | 2621 | if (\TYPO3\CMS\Core\Utility\MathUtility::canBeInterpretedAsInteger($uid)) { |
@@ -2720,7 +2761,8 @@ discard block |
||
2720 | 2761 | * |
2721 | 2762 | * @return mixed Value of $this->$var |
2722 | 2763 | */ |
2723 | - public function __get($var) { |
|
2764 | + public function __get($var) |
|
2765 | + { |
|
2724 | 2766 | |
2725 | 2767 | $method = '_get'.ucfirst($var); |
2726 | 2768 | |
@@ -2752,7 +2794,8 @@ discard block |
||
2752 | 2794 | * |
2753 | 2795 | * @return void |
2754 | 2796 | */ |
2755 | - public function __set($var, $value) { |
|
2797 | + public function __set($var, $value) |
|
2798 | + { |
|
2756 | 2799 | |
2757 | 2800 | $method = '_set'.ucfirst($var); |
2758 | 2801 | |
@@ -2780,7 +2823,8 @@ discard block |
||
2780 | 2823 | * |
2781 | 2824 | * @return array Properties to be serialized |
2782 | 2825 | */ |
2783 | - public function __sleep() { |
|
2826 | + public function __sleep() |
|
2827 | + { |
|
2784 | 2828 | |
2785 | 2829 | // SimpleXMLElement objects can't be serialized, thus save the XML as string for serialization |
2786 | 2830 | $this->asXML = $this->xml->asXML(); |
@@ -2796,7 +2840,8 @@ discard block |
||
2796 | 2840 | * |
2797 | 2841 | * @return string String representing the METS object |
2798 | 2842 | */ |
2799 | - public function __toString() { |
|
2843 | + public function __toString() |
|
2844 | + { |
|
2800 | 2845 | |
2801 | 2846 | $xml = new DOMDocument('1.0', 'utf-8'); |
2802 | 2847 | |
@@ -2816,7 +2861,8 @@ discard block |
||
2816 | 2861 | * |
2817 | 2862 | * @return void |
2818 | 2863 | */ |
2819 | - public function __wakeup() { |
|
2864 | + public function __wakeup() |
|
2865 | + { |
|
2820 | 2866 | |
2821 | 2867 | // Turn off libxml's error logging. |
2822 | 2868 | $libxmlErrors = libxml_use_internal_errors(TRUE); |
@@ -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. |
@@ -160,7 +160,7 @@ discard block |
||
160 | 160 | |
161 | 161 | } elseif ($checksum == 10) { |
162 | 162 | |
163 | - return self::checkIdentifier(($digits + 1).substr($id, -2, 2), 'SWD'); |
|
163 | + return self::checkIdentifier(($digits + 1) . substr($id, -2, 2), 'SWD'); |
|
164 | 164 | |
165 | 165 | } elseif (substr($id, -1, 1) != $checksum) { |
166 | 166 | |
@@ -218,7 +218,7 @@ discard block |
||
218 | 218 | |
219 | 219 | if (TYPO3_DLOG) { |
220 | 220 | |
221 | - \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('[tx_dlf_helper->decrypt('.$encrypted.', '.$hash.')] PHP extension "mcrypt" not available', self::$extKey, SYSLOG_SEVERITY_WARNING); |
|
221 | + \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('[tx_dlf_helper->decrypt(' . $encrypted . ', ' . $hash . ')] PHP extension "mcrypt" not available', self::$extKey, SYSLOG_SEVERITY_WARNING); |
|
222 | 222 | |
223 | 223 | } |
224 | 224 | |
@@ -230,7 +230,7 @@ discard block |
||
230 | 230 | |
231 | 231 | if (TYPO3_DLOG) { |
232 | 232 | |
233 | - \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('[tx_dlf_helper->decrypt('.$encrypted.', '.$hash.')] Invalid parameters given for decryption', self::$extKey, SYSLOG_SEVERITY_ERROR); |
|
233 | + \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('[tx_dlf_helper->decrypt(' . $encrypted . ', ' . $hash . ')] Invalid parameters given for decryption', self::$extKey, SYSLOG_SEVERITY_ERROR); |
|
234 | 234 | |
235 | 235 | } |
236 | 236 | |
@@ -242,7 +242,7 @@ discard block |
||
242 | 242 | |
243 | 243 | if (TYPO3_DLOG) { |
244 | 244 | |
245 | - \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('[tx_dlf_helper->decrypt('.$encrypted.', '.$hash.')] No encryption key set in TYPO3 configuration', self::$extKey, SYSLOG_SEVERITY_ERROR); |
|
245 | + \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('[tx_dlf_helper->decrypt(' . $encrypted . ', ' . $hash . ')] No encryption key set in TYPO3 configuration', self::$extKey, SYSLOG_SEVERITY_ERROR); |
|
246 | 246 | |
247 | 247 | } |
248 | 248 | |
@@ -256,13 +256,13 @@ discard block |
||
256 | 256 | |
257 | 257 | $salt = substr($hash, 0, 10); |
258 | 258 | |
259 | - $hashed = $salt.substr(sha1($salt.$decrypted), -10); |
|
259 | + $hashed = $salt . substr(sha1($salt . $decrypted), -10); |
|
260 | 260 | |
261 | 261 | if ($hashed !== $hash) { |
262 | 262 | |
263 | 263 | if (TYPO3_DLOG) { |
264 | 264 | |
265 | - \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('[tx_dlf_helper->decrypt('.$encrypted.', '.$hash.')] Invalid hash "'.$hash.'" given for decryption', self::$extKey, SYSLOG_SEVERITY_WARNING); |
|
265 | + \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('[tx_dlf_helper->decrypt(' . $encrypted . ', ' . $hash . ')] Invalid hash "' . $hash . '" given for decryption', self::$extKey, SYSLOG_SEVERITY_WARNING); |
|
266 | 266 | |
267 | 267 | } |
268 | 268 | |
@@ -291,7 +291,7 @@ discard block |
||
291 | 291 | |
292 | 292 | if (TYPO3_DLOG) { |
293 | 293 | |
294 | - \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('[tx_dlf_helper->encrypt('.$string.')] PHP extension "mcrypt" not available', self::$extKey, SYSLOG_SEVERITY_WARNING); |
|
294 | + \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('[tx_dlf_helper->encrypt(' . $string . ')] PHP extension "mcrypt" not available', self::$extKey, SYSLOG_SEVERITY_WARNING); |
|
295 | 295 | |
296 | 296 | } |
297 | 297 | |
@@ -303,7 +303,7 @@ discard block |
||
303 | 303 | |
304 | 304 | if (TYPO3_DLOG) { |
305 | 305 | |
306 | - \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('[tx_dlf_helper->encrypt('.$string.')] No encryption key set in TYPO3 configuration', self::$extKey, SYSLOG_SEVERITY_ERROR); |
|
306 | + \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('[tx_dlf_helper->encrypt(' . $string . ')] No encryption key set in TYPO3 configuration', self::$extKey, SYSLOG_SEVERITY_ERROR); |
|
307 | 307 | |
308 | 308 | } |
309 | 309 | |
@@ -317,9 +317,9 @@ discard block |
||
317 | 317 | |
318 | 318 | $salt = substr(md5(uniqid(rand(), TRUE)), 0, 10); |
319 | 319 | |
320 | - $hash = $salt.substr(sha1($salt.$string), -10); |
|
320 | + $hash = $salt . substr(sha1($salt . $string), -10); |
|
321 | 321 | |
322 | - return array ('encrypted' => $encrypted, 'hash' => $hash); |
|
322 | + return array('encrypted' => $encrypted, 'hash' => $hash); |
|
323 | 323 | |
324 | 324 | } |
325 | 325 | |
@@ -351,7 +351,7 @@ discard block |
||
351 | 351 | |
352 | 352 | if (TYPO3_DLOG) { |
353 | 353 | |
354 | - \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('[tx_dlf_helper->getBeUser()] Unexpected TYPO3_MODE "'.TYPO3_MODE.'"', self::$extKey, SYSLOG_SEVERITY_ERROR); |
|
354 | + \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('[tx_dlf_helper->getBeUser()] Unexpected TYPO3_MODE "' . TYPO3_MODE . '"', self::$extKey, SYSLOG_SEVERITY_ERROR); |
|
355 | 355 | |
356 | 356 | } |
357 | 357 | |
@@ -414,7 +414,7 @@ discard block |
||
414 | 414 | |
415 | 415 | if (TYPO3_DLOG) { |
416 | 416 | |
417 | - \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('[tx_dlf_helper->getFeUser()] Unexpected TYPO3_MODE "'.TYPO3_MODE.'"', self::$extKey, SYSLOG_SEVERITY_ERROR); |
|
417 | + \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('[tx_dlf_helper->getFeUser()] Unexpected TYPO3_MODE "' . TYPO3_MODE . '"', self::$extKey, SYSLOG_SEVERITY_ERROR); |
|
418 | 418 | |
419 | 419 | } |
420 | 420 | |
@@ -435,11 +435,11 @@ discard block |
||
435 | 435 | */ |
436 | 436 | public static function getHookObjects($scriptRelPath) { |
437 | 437 | |
438 | - $hookObjects = array (); |
|
438 | + $hookObjects = array(); |
|
439 | 439 | |
440 | - if (is_array($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS'][self::$extKey.'/'.$scriptRelPath]['hookClass'])) { |
|
440 | + if (is_array($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS'][self::$extKey . '/' . $scriptRelPath]['hookClass'])) { |
|
441 | 441 | |
442 | - foreach ($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS'][self::$extKey.'/'.$scriptRelPath]['hookClass'] as $classRef) { |
|
442 | + foreach ($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS'][self::$extKey . '/' . $scriptRelPath]['hookClass'] as $classRef) { |
|
443 | 443 | |
444 | 444 | $hookObjects[] = &\TYPO3\CMS\Core\Utility\GeneralUtility::getUserObj($classRef); |
445 | 445 | |
@@ -472,11 +472,11 @@ discard block |
||
472 | 472 | // Sanitize input. |
473 | 473 | $uid = max(intval($uid), 0); |
474 | 474 | |
475 | - if (!$uid || !in_array($table, array ('tx_dlf_collections', 'tx_dlf_libraries', 'tx_dlf_metadata', 'tx_dlf_structures', 'tx_dlf_solrcores'))) { |
|
475 | + if (!$uid || !in_array($table, array('tx_dlf_collections', 'tx_dlf_libraries', 'tx_dlf_metadata', 'tx_dlf_structures', 'tx_dlf_solrcores'))) { |
|
476 | 476 | |
477 | 477 | if (TYPO3_DLOG) { |
478 | 478 | |
479 | - \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('[tx_dlf_helper->getIndexName('.$_uid.', '.$table.', '.$_pid.')] Invalid UID "'.$uid.'" or table "'.$table.'"', self::$extKey, SYSLOG_SEVERITY_ERROR); |
|
479 | + \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('[tx_dlf_helper->getIndexName(' . $_uid . ', ' . $table . ', ' . $_pid . ')] Invalid UID "' . $uid . '" or table "' . $table . '"', self::$extKey, SYSLOG_SEVERITY_ERROR); |
|
480 | 480 | |
481 | 481 | } |
482 | 482 | |
@@ -491,15 +491,15 @@ discard block |
||
491 | 491 | |
492 | 492 | $pid = max(intval($pid), 0); |
493 | 493 | |
494 | - $where = ' AND '.$table.'.pid='.$pid; |
|
494 | + $where = ' AND ' . $table . '.pid=' . $pid; |
|
495 | 495 | |
496 | 496 | } |
497 | 497 | |
498 | 498 | // Get index_name from database. |
499 | 499 | $result = $GLOBALS['TYPO3_DB']->exec_SELECTquery( |
500 | - $table.'.index_name AS index_name', |
|
500 | + $table . '.index_name AS index_name', |
|
501 | 501 | $table, |
502 | - $table.'.uid='.$uid.$where.self::whereClause($table), |
|
502 | + $table . '.uid=' . $uid . $where . self::whereClause($table), |
|
503 | 503 | '', |
504 | 504 | '', |
505 | 505 | '1' |
@@ -515,7 +515,7 @@ discard block |
||
515 | 515 | |
516 | 516 | if (TYPO3_DLOG) { |
517 | 517 | |
518 | - \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('[tx_dlf_helper->getIndexName('.$_uid.', '.$table.', '.$_pid.')] No "index_name" with UID "'.$uid.'" and PID "'.$pid.'" found in table "'.$table.'"', self::$extKey, SYSLOG_SEVERITY_WARNING); |
|
518 | + \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('[tx_dlf_helper->getIndexName(' . $_uid . ', ' . $table . ', ' . $_pid . ')] No "index_name" with UID "' . $uid . '" and PID "' . $pid . '" found in table "' . $table . '"', self::$extKey, SYSLOG_SEVERITY_WARNING); |
|
519 | 519 | |
520 | 520 | } |
521 | 521 | |
@@ -543,11 +543,11 @@ discard block |
||
543 | 543 | |
544 | 544 | $_pid = $pid; |
545 | 545 | |
546 | - if (!$index_name || !in_array($table, array ('tx_dlf_collections', 'tx_dlf_libraries', 'tx_dlf_metadata', 'tx_dlf_structures', 'tx_dlf_solrcores'))) { |
|
546 | + if (!$index_name || !in_array($table, array('tx_dlf_collections', 'tx_dlf_libraries', 'tx_dlf_metadata', 'tx_dlf_structures', 'tx_dlf_solrcores'))) { |
|
547 | 547 | |
548 | 548 | if (TYPO3_DLOG) { |
549 | 549 | |
550 | - \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('[tx_dlf_helper->getIdFromIndexName('.$_index_name.', '.$table.', '.$_pid.')] Invalid UID "'.$index_name.'" or table "'.$table.'"', self::$extKey, SYSLOG_SEVERITY_ERROR); |
|
550 | + \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('[tx_dlf_helper->getIdFromIndexName(' . $_index_name . ', ' . $table . ', ' . $_pid . ')] Invalid UID "' . $index_name . '" or table "' . $table . '"', self::$extKey, SYSLOG_SEVERITY_ERROR); |
|
551 | 551 | |
552 | 552 | } |
553 | 553 | |
@@ -562,15 +562,15 @@ discard block |
||
562 | 562 | |
563 | 563 | $pid = max(intval($pid), 0); |
564 | 564 | |
565 | - $where = ' AND '.$table.'.pid='.$pid; |
|
565 | + $where = ' AND ' . $table . '.pid=' . $pid; |
|
566 | 566 | |
567 | 567 | } |
568 | 568 | |
569 | 569 | // Get index_name from database. |
570 | 570 | $result = $GLOBALS['TYPO3_DB']->exec_SELECTquery( |
571 | - $table.'.uid AS uid', |
|
571 | + $table . '.uid AS uid', |
|
572 | 572 | $table, |
573 | - $table.'.index_name="'.$index_name.'"'.$where.self::whereClause($table), |
|
573 | + $table . '.index_name="' . $index_name . '"' . $where . self::whereClause($table), |
|
574 | 574 | '', |
575 | 575 | '', |
576 | 576 | '1' |
@@ -586,7 +586,7 @@ discard block |
||
586 | 586 | |
587 | 587 | if (TYPO3_DLOG) { |
588 | 588 | |
589 | - \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('[tx_dlf_helper->getIdFromIndexName('.$_index_name.', '.$table.', '.$_pid.')] No UID for given "index_name" "'.$index_name.'" and PID "'.$pid.'" found in table "'.$table.'"', self::$extKey, SYSLOG_SEVERITY_WARNING); |
|
589 | + \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('[tx_dlf_helper->getIdFromIndexName(' . $_index_name . ', ' . $table . ', ' . $_pid . ')] No UID for given "index_name" "' . $index_name . '" and PID "' . $pid . '" found in table "' . $table . '"', self::$extKey, SYSLOG_SEVERITY_WARNING); |
|
590 | 590 | |
591 | 591 | } |
592 | 592 | |
@@ -612,11 +612,11 @@ discard block |
||
612 | 612 | |
613 | 613 | if (preg_match('/^[a-z]{3}$/', $isoCode)) { |
614 | 614 | |
615 | - $file = \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath(self::$extKey).'lib/ISO-639/iso-639-2b.xml'; |
|
615 | + $file = \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath(self::$extKey) . 'lib/ISO-639/iso-639-2b.xml'; |
|
616 | 616 | |
617 | 617 | } elseif (preg_match('/^[a-z]{2}$/', $isoCode)) { |
618 | 618 | |
619 | - $file = \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath(self::$extKey).'lib/ISO-639/iso-639-1.xml'; |
|
619 | + $file = \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath(self::$extKey) . 'lib/ISO-639/iso-639-1.xml'; |
|
620 | 620 | |
621 | 621 | } else { |
622 | 622 | |
@@ -650,7 +650,7 @@ discard block |
||
650 | 650 | |
651 | 651 | if (TYPO3_DLOG) { |
652 | 652 | |
653 | - \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('[tx_dlf_helper->getLanguageName('.$code.')] Unexpected TYPO3_MODE "'.TYPO3_MODE.'"', self::$extKey, SYSLOG_SEVERITY_ERROR); |
|
653 | + \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('[tx_dlf_helper->getLanguageName(' . $code . ')] Unexpected TYPO3_MODE "' . TYPO3_MODE . '"', self::$extKey, SYSLOG_SEVERITY_ERROR); |
|
654 | 654 | |
655 | 655 | } |
656 | 656 | |
@@ -666,7 +666,7 @@ discard block |
||
666 | 666 | |
667 | 667 | if (TYPO3_DLOG) { |
668 | 668 | |
669 | - \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('[tx_dlf_helper->getLanguageName('.$code.')] Language code "'.$code.'" not found in ISO-639 table', self::$extKey, SYSLOG_SEVERITY_NOTICE); |
|
669 | + \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('[tx_dlf_helper->getLanguageName(' . $code . ')] Language code "' . $code . '" not found in ISO-639 table', self::$extKey, SYSLOG_SEVERITY_NOTICE); |
|
670 | 670 | |
671 | 671 | } |
672 | 672 | |
@@ -705,7 +705,7 @@ discard block |
||
705 | 705 | |
706 | 706 | } elseif (TYPO3_DLOG) { |
707 | 707 | |
708 | - \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('[tx_dlf_helper->getLL('.$key.', '.$default.', ['.($hsc ? 'TRUE' : 'FALSE').'])] Unexpected TYPO3_MODE "'.TYPO3_MODE.'"', self::$extKey, SYSLOG_SEVERITY_ERROR); |
|
708 | + \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('[tx_dlf_helper->getLL(' . $key . ', ' . $default . ', [' . ($hsc ? 'TRUE' : 'FALSE') . '])] Unexpected TYPO3_MODE "' . TYPO3_MODE . '"', self::$extKey, SYSLOG_SEVERITY_ERROR); |
|
709 | 709 | |
710 | 710 | } |
711 | 711 | |
@@ -724,7 +724,7 @@ discard block |
||
724 | 724 | |
725 | 725 | } elseif (TYPO3_DLOG) { |
726 | 726 | |
727 | - \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('[tx_dlf_helper->getLL('.$key.', '.$default.', ['.($hsc ? 'TRUE' : 'FALSE').'])] Unexpected TYPO3_MODE "'.TYPO3_MODE.'"', self::$extKey, SYSLOG_SEVERITY_ERROR); |
|
727 | + \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('[tx_dlf_helper->getLL(' . $key . ', ' . $default . ', [' . ($hsc ? 'TRUE' : 'FALSE') . '])] Unexpected TYPO3_MODE "' . TYPO3_MODE . '"', self::$extKey, SYSLOG_SEVERITY_ERROR); |
|
728 | 728 | |
729 | 729 | } |
730 | 730 | |
@@ -754,7 +754,7 @@ discard block |
||
754 | 754 | */ |
755 | 755 | public static function getURN($base, $id) { |
756 | 756 | |
757 | - $concordance = array ( |
|
757 | + $concordance = array( |
|
758 | 758 | '0' => 1, |
759 | 759 | '1' => 2, |
760 | 760 | '2' => 3, |
@@ -795,13 +795,13 @@ discard block |
||
795 | 795 | ':' => 17, |
796 | 796 | ); |
797 | 797 | |
798 | - $urn = strtolower($base.$id); |
|
798 | + $urn = strtolower($base . $id); |
|
799 | 799 | |
800 | 800 | if (preg_match('/[^a-z0-9:-]/', $urn)) { |
801 | 801 | |
802 | 802 | if (TYPO3_DLOG) { |
803 | 803 | |
804 | - \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('[tx_dlf_helper->getURN('.$base.', '.$id.')] Invalid chars in given parameters', self::$extKey, SYSLOG_SEVERITY_WARNING); |
|
804 | + \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('[tx_dlf_helper->getURN(' . $base . ', ' . $id . ')] Invalid chars in given parameters', self::$extKey, SYSLOG_SEVERITY_WARNING); |
|
805 | 805 | |
806 | 806 | } |
807 | 807 | |
@@ -827,7 +827,7 @@ discard block |
||
827 | 827 | |
828 | 828 | $checksum = substr(intval($checksum / intval(substr($digits, -1, 1))), -1, 1); |
829 | 829 | |
830 | - return $base.$id.$checksum; |
|
830 | + return $base . $id . $checksum; |
|
831 | 831 | |
832 | 832 | } |
833 | 833 | |
@@ -867,7 +867,7 @@ discard block |
||
867 | 867 | |
868 | 868 | if (TYPO3_DLOG) { |
869 | 869 | |
870 | - \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('[tx_dlf_helper->loadFromSession('.$_key.')] Invalid key "'.$key.'" for session data retrieval', self::$extKey, SYSLOG_SEVERITY_WARNING); |
|
870 | + \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('[tx_dlf_helper->loadFromSession(' . $_key . ')] Invalid key "' . $key . '" for session data retrieval', self::$extKey, SYSLOG_SEVERITY_WARNING); |
|
871 | 871 | |
872 | 872 | } |
873 | 873 | |
@@ -888,7 +888,7 @@ discard block |
||
888 | 888 | |
889 | 889 | if (TYPO3_DLOG) { |
890 | 890 | |
891 | - \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('[tx_dlf_helper->loadFromSession('.$_key.')] Unexpected TYPO3_MODE "'.TYPO3_MODE.'"', self::$extKey, SYSLOG_SEVERITY_ERROR); |
|
891 | + \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('[tx_dlf_helper->loadFromSession(' . $_key . ')] Unexpected TYPO3_MODE "' . TYPO3_MODE . '"', self::$extKey, SYSLOG_SEVERITY_ERROR); |
|
892 | 892 | |
893 | 893 | } |
894 | 894 | |
@@ -910,7 +910,7 @@ discard block |
||
910 | 910 | * |
911 | 911 | * @return array Array of substituted "NEW..." identifiers and their actual UIDs. |
912 | 912 | */ |
913 | - public static function processDB(array $data = array (), array $cmd = array (), $reverseOrder = FALSE, $be_user = FALSE) { |
|
913 | + public static function processDB(array $data = array(), array $cmd = array(), $reverseOrder = FALSE, $be_user = FALSE) { |
|
914 | 914 | |
915 | 915 | // Instantiate TYPO3 core engine. |
916 | 916 | $tce = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\DataHandling\\DataHandler'); |
@@ -968,7 +968,7 @@ discard block |
||
968 | 968 | * |
969 | 969 | * @return array Array of substituted "NEW..." identifiers and their actual UIDs. |
970 | 970 | */ |
971 | - public static function processDBasAdmin(array $data = array (), array $cmd = array (), $reverseOrder = FALSE) { |
|
971 | + public static function processDBasAdmin(array $data = array(), array $cmd = array(), $reverseOrder = FALSE) { |
|
972 | 972 | |
973 | 973 | if (TYPO3_MODE === 'BE' && $GLOBALS['BE_USER']->isAdmin()) { |
974 | 974 | |
@@ -978,11 +978,11 @@ discard block |
||
978 | 978 | |
979 | 979 | if (TYPO3_DLOG) { |
980 | 980 | |
981 | - \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)); |
|
981 | + \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)); |
|
982 | 982 | |
983 | 983 | } |
984 | 984 | |
985 | - return array (); |
|
985 | + return array(); |
|
986 | 986 | |
987 | 987 | } |
988 | 988 | |
@@ -1025,7 +1025,7 @@ discard block |
||
1025 | 1025 | |
1026 | 1026 | if ($flashMessage->getTitle() !== '') { |
1027 | 1027 | |
1028 | - $messageContent = sprintf('<h4>%s</h4>', htmlspecialchars($flashMessage->getTitle())).$messageContent; |
|
1028 | + $messageContent = sprintf('<h4>%s</h4>', htmlspecialchars($flashMessage->getTitle())) . $messageContent; |
|
1029 | 1029 | |
1030 | 1030 | } |
1031 | 1031 | |
@@ -1065,7 +1065,7 @@ discard block |
||
1065 | 1065 | |
1066 | 1066 | if (TYPO3_DLOG) { |
1067 | 1067 | |
1068 | - \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('[tx_dlf_helper->saveToSession([data], '.$_key.')] Invalid key "'.$key.'" for session data saving', self::$extKey, SYSLOG_SEVERITY_WARNING, $value); |
|
1068 | + \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('[tx_dlf_helper->saveToSession([data], ' . $_key . ')] Invalid key "' . $key . '" for session data saving', self::$extKey, SYSLOG_SEVERITY_WARNING, $value); |
|
1069 | 1069 | |
1070 | 1070 | } |
1071 | 1071 | |
@@ -1092,7 +1092,7 @@ discard block |
||
1092 | 1092 | |
1093 | 1093 | if (TYPO3_DLOG) { |
1094 | 1094 | |
1095 | - \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('[tx_dlf_helper->saveToSession([data], '.$_key.')] Unexpected TYPO3_MODE "'.TYPO3_MODE.'"', self::$extKey, SYSLOG_SEVERITY_ERROR, $data); |
|
1095 | + \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('[tx_dlf_helper->saveToSession([data], ' . $_key . ')] Unexpected TYPO3_MODE "' . TYPO3_MODE . '"', self::$extKey, SYSLOG_SEVERITY_ERROR, $data); |
|
1096 | 1096 | |
1097 | 1097 | } |
1098 | 1098 | |
@@ -1121,7 +1121,7 @@ discard block |
||
1121 | 1121 | $_pid = $pid; |
1122 | 1122 | |
1123 | 1123 | // Load labels into static variable for future use. |
1124 | - static $labels = array (); |
|
1124 | + static $labels = array(); |
|
1125 | 1125 | |
1126 | 1126 | // Sanitize input. |
1127 | 1127 | $pid = max(intval($pid), 0); |
@@ -1130,7 +1130,7 @@ discard block |
||
1130 | 1130 | |
1131 | 1131 | if (TYPO3_DLOG) { |
1132 | 1132 | |
1133 | - \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('[tx_dlf_helper->translate('.$_index_name.', '.$table.', '.$_pid.')] Invalid PID "'.$pid.'" for translation', self::$extKey, SYSLOG_SEVERITY_WARNING); |
|
1133 | + \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('[tx_dlf_helper->translate(' . $_index_name . ', ' . $table . ', ' . $_pid . ')] Invalid PID "' . $pid . '" for translation', self::$extKey, SYSLOG_SEVERITY_WARNING); |
|
1134 | 1134 | |
1135 | 1135 | } |
1136 | 1136 | |
@@ -1153,7 +1153,7 @@ discard block |
||
1153 | 1153 | $result = $GLOBALS['TYPO3_DB']->exec_SELECTquery( |
1154 | 1154 | 'uid, l18n_parent', |
1155 | 1155 | $table, |
1156 | - 'pid='.$pid.' AND index_name="'.$index_name.'"'.self::whereClause($table, TRUE), |
|
1156 | + 'pid=' . $pid . ' AND index_name="' . $index_name . '"' . self::whereClause($table, TRUE), |
|
1157 | 1157 | '', |
1158 | 1158 | '', |
1159 | 1159 | '' |
@@ -1167,7 +1167,7 @@ discard block |
||
1167 | 1167 | $result = $GLOBALS['TYPO3_DB']->exec_SELECTquery( |
1168 | 1168 | 'index_name', |
1169 | 1169 | $table, |
1170 | - 'pid='.$pid.' AND uid='.$resArray['l18n_parent'].' AND sys_language_uid='.intval($GLOBALS['TSFE']->sys_language_content).self::whereClause($table, TRUE), |
|
1170 | + 'pid=' . $pid . ' AND uid=' . $resArray['l18n_parent'] . ' AND sys_language_uid=' . intval($GLOBALS['TSFE']->sys_language_content) . self::whereClause($table, TRUE), |
|
1171 | 1171 | '', |
1172 | 1172 | '', |
1173 | 1173 | '' |
@@ -1188,13 +1188,13 @@ discard block |
||
1188 | 1188 | if (empty($labels[$table][$pid][$GLOBALS['TSFE']->sys_language_content][$index_name])) { |
1189 | 1189 | |
1190 | 1190 | // Check if this table is allowed for translation. |
1191 | - if (in_array($table, array ('tx_dlf_collections', 'tx_dlf_libraries', 'tx_dlf_metadata', 'tx_dlf_structures'))) { |
|
1191 | + if (in_array($table, array('tx_dlf_collections', 'tx_dlf_libraries', 'tx_dlf_metadata', 'tx_dlf_structures'))) { |
|
1192 | 1192 | |
1193 | 1193 | $additionalWhere = ' AND sys_language_uid IN (-1,0)'; |
1194 | 1194 | |
1195 | 1195 | if ($GLOBALS['TSFE']->sys_language_content > 0) { |
1196 | 1196 | |
1197 | - $additionalWhere = ' AND (sys_language_uid IN (-1,0) OR (sys_language_uid='.intval($GLOBALS['TSFE']->sys_language_content).' AND l18n_parent=0))'; |
|
1197 | + $additionalWhere = ' AND (sys_language_uid IN (-1,0) OR (sys_language_uid=' . intval($GLOBALS['TSFE']->sys_language_content) . ' AND l18n_parent=0))'; |
|
1198 | 1198 | |
1199 | 1199 | } |
1200 | 1200 | |
@@ -1202,7 +1202,7 @@ discard block |
||
1202 | 1202 | $result = $GLOBALS['TYPO3_DB']->exec_SELECTquery( |
1203 | 1203 | '*', |
1204 | 1204 | $table, |
1205 | - 'pid='.$pid.$additionalWhere.self::whereClause($table, TRUE), |
|
1205 | + 'pid=' . $pid . $additionalWhere . self::whereClause($table, TRUE), |
|
1206 | 1206 | '', |
1207 | 1207 | '', |
1208 | 1208 | '' |
@@ -1231,7 +1231,7 @@ discard block |
||
1231 | 1231 | |
1232 | 1232 | if (TYPO3_DLOG) { |
1233 | 1233 | |
1234 | - \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('[tx_dlf_helper->translate('.$_index_name.', '.$table.', '.$_pid.')] No translation with PID "'.$pid.'" available in table "'.$table.'" or translation not accessible', self::extKey, SYSLOG_SEVERITY_NOTICE); |
|
1234 | + \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('[tx_dlf_helper->translate(' . $_index_name . ', ' . $table . ', ' . $_pid . ')] No translation with PID "' . $pid . '" available in table "' . $table . '" or translation not accessible', self::extKey, SYSLOG_SEVERITY_NOTICE); |
|
1235 | 1235 | |
1236 | 1236 | } |
1237 | 1237 | |
@@ -1241,7 +1241,7 @@ discard block |
||
1241 | 1241 | |
1242 | 1242 | if (TYPO3_DLOG) { |
1243 | 1243 | |
1244 | - \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('[tx_dlf_helper->translate('.$_index_name.', '.$table.', '.$_pid.')] No translations available for table "'.$table.'"', self::$extKey, SYSLOG_SEVERITY_WARNING); |
|
1244 | + \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('[tx_dlf_helper->translate(' . $_index_name . ', ' . $table . ', ' . $_pid . ')] No translations available for table "' . $table . '"', self::$extKey, SYSLOG_SEVERITY_WARNING); |
|
1245 | 1245 | |
1246 | 1246 | } |
1247 | 1247 | |
@@ -1314,7 +1314,7 @@ discard block |
||
1314 | 1314 | |
1315 | 1315 | if (TYPO3_DLOG) { |
1316 | 1316 | |
1317 | - \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('[tx_dlf_helper->whereClause('.$table.', ['.($showHidden ? 'TRUE' : 'FALSE').'])] Unexpected TYPO3_MODE "'.TYPO3_MODE.'"', self::$extKey, SYSLOG_SEVERITY_ERROR); |
|
1317 | + \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('[tx_dlf_helper->whereClause(' . $table . ', [' . ($showHidden ? 'TRUE' : 'FALSE') . '])] Unexpected TYPO3_MODE "' . TYPO3_MODE . '"', self::$extKey, SYSLOG_SEVERITY_ERROR); |
|
1318 | 1318 | |
1319 | 1319 | } |
1320 | 1320 |
@@ -18,7 +18,8 @@ discard block |
||
18 | 18 | * @subpackage tx_dlf |
19 | 19 | * @access public |
20 | 20 | */ |
21 | -class tx_dlf_helper { |
|
21 | +class tx_dlf_helper |
|
22 | +{ |
|
22 | 23 | |
23 | 24 | /** |
24 | 25 | * The extension key |
@@ -45,7 +46,8 @@ discard block |
||
45 | 46 | * |
46 | 47 | * @return void |
47 | 48 | */ |
48 | - public static function addMessage($message) { |
|
49 | + public static function addMessage($message) |
|
50 | + { |
|
49 | 51 | |
50 | 52 | $flashMessageService = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\Messaging\\FlashMessageService'); |
51 | 53 | |
@@ -64,7 +66,8 @@ discard block |
||
64 | 66 | * |
65 | 67 | * @return array Merged array with second array overruling first one |
66 | 68 | */ |
67 | - static public function array_merge_recursive_overrule($array1, $array2) { |
|
69 | + static public function array_merge_recursive_overrule($array1, $array2) |
|
70 | + { |
|
68 | 71 | |
69 | 72 | if (class_exists('\\TYPO3\\CMS\\Core\\Utility\\ArrayUtility')) { |
70 | 73 | |
@@ -92,7 +95,8 @@ discard block |
||
92 | 95 | * |
93 | 96 | * @return boolean Is $id a valid GNL identifier of the given $type? |
94 | 97 | */ |
95 | - public static function checkIdentifier($id, $type) { |
|
98 | + public static function checkIdentifier($id, $type) |
|
99 | + { |
|
96 | 100 | |
97 | 101 | $digits = substr($id, 0, 8); |
98 | 102 | |
@@ -209,7 +213,8 @@ discard block |
||
209 | 213 | * |
210 | 214 | * @return mixed The decrypted value or NULL on error |
211 | 215 | */ |
212 | - public static function decrypt($encrypted, $hash) { |
|
216 | + public static function decrypt($encrypted, $hash) |
|
217 | + { |
|
213 | 218 | |
214 | 219 | $decrypted = NULL; |
215 | 220 | |
@@ -284,7 +289,8 @@ discard block |
||
284 | 289 | * |
285 | 290 | * @return array Array with encrypted string and control hash |
286 | 291 | */ |
287 | - public static function encrypt($string) { |
|
292 | + public static function encrypt($string) |
|
293 | + { |
|
288 | 294 | |
289 | 295 | // Check for PHP extension "mcrypt". |
290 | 296 | if (!extension_loaded('mcrypt')) { |
@@ -330,7 +336,8 @@ discard block |
||
330 | 336 | * |
331 | 337 | * @return \TYPO3\CMS\Core\Authentication\BackendUserAuthentication Instance of \TYPO3\CMS\Core\Authentication\BackendUserAuthentication or NULL on failure |
332 | 338 | */ |
333 | - public static function getBeUser() { |
|
339 | + public static function getBeUser() |
|
340 | + { |
|
334 | 341 | |
335 | 342 | if (TYPO3_MODE === 'FE' || TYPO3_MODE === 'BE') { |
336 | 343 | |
@@ -370,7 +377,8 @@ discard block |
||
370 | 377 | * |
371 | 378 | * @return string The cleaned up string |
372 | 379 | */ |
373 | - public static function getCleanString($string) { |
|
380 | + public static function getCleanString($string) |
|
381 | + { |
|
374 | 382 | |
375 | 383 | // Convert to lowercase. |
376 | 384 | $string = strtolower($string); |
@@ -395,7 +403,8 @@ discard block |
||
395 | 403 | * |
396 | 404 | * @return \TYPO3\CMS\Frontend\Authentication\FrontendUserAuthentication Instance of \TYPO3\CMS\Frontend\Authentication\FrontendUserAuthentication or NULL on failure |
397 | 405 | */ |
398 | - public static function getFeUser() { |
|
406 | + public static function getFeUser() |
|
407 | + { |
|
399 | 408 | |
400 | 409 | if (TYPO3_MODE === 'FE') { |
401 | 410 | |
@@ -433,7 +442,8 @@ discard block |
||
433 | 442 | * |
434 | 443 | * @return array Array of hook objects for the class |
435 | 444 | */ |
436 | - public static function getHookObjects($scriptRelPath) { |
|
445 | + public static function getHookObjects($scriptRelPath) |
|
446 | + { |
|
437 | 447 | |
438 | 448 | $hookObjects = array (); |
439 | 449 | |
@@ -462,7 +472,8 @@ discard block |
||
462 | 472 | * |
463 | 473 | * @return string "index_name" for the given UID |
464 | 474 | */ |
465 | - public static function getIndexName($uid, $table, $pid = -1) { |
|
475 | + public static function getIndexName($uid, $table, $pid = -1) |
|
476 | + { |
|
466 | 477 | |
467 | 478 | // Save parameters for logging purposes. |
468 | 479 | $_uid = $uid; |
@@ -536,7 +547,8 @@ discard block |
||
536 | 547 | * |
537 | 548 | * @return string "uid" for the given index_name |
538 | 549 | */ |
539 | - public static function getIdFromIndexName($index_name, $table, $pid = -1) { |
|
550 | + public static function getIdFromIndexName($index_name, $table, $pid = -1) |
|
551 | + { |
|
540 | 552 | |
541 | 553 | // Save parameters for logging purposes. |
542 | 554 | $_index_name = $index_name; |
@@ -605,7 +617,8 @@ discard block |
||
605 | 617 | * |
606 | 618 | * @return string Localized full name of language or unchanged input |
607 | 619 | */ |
608 | - public static function getLanguageName($code) { |
|
620 | + public static function getLanguageName($code) |
|
621 | + { |
|
609 | 622 | |
610 | 623 | // Analyze code and set appropriate ISO table. |
611 | 624 | $isoCode = strtolower(trim($code)); |
@@ -685,7 +698,8 @@ discard block |
||
685 | 698 | * |
686 | 699 | * @return string The translated string or the given key on failure |
687 | 700 | */ |
688 | - public static function getLL($key, $hsc = FALSE, $default = '') { |
|
701 | + public static function getLL($key, $hsc = FALSE, $default = '') |
|
702 | + { |
|
689 | 703 | |
690 | 704 | // Set initial output to default value. |
691 | 705 | $translated = (string) $default; |
@@ -752,7 +766,8 @@ discard block |
||
752 | 766 | * |
753 | 767 | * @return string Uniform Resource Name as string |
754 | 768 | */ |
755 | - public static function getURN($base, $id) { |
|
769 | + public static function getURN($base, $id) |
|
770 | + { |
|
756 | 771 | |
757 | 772 | $concordance = array ( |
758 | 773 | '0' => 1, |
@@ -840,7 +855,8 @@ discard block |
||
840 | 855 | * |
841 | 856 | * @return boolean Is $id a valid PPN? |
842 | 857 | */ |
843 | - public static function isPPN($id) { |
|
858 | + public static function isPPN($id) |
|
859 | + { |
|
844 | 860 | |
845 | 861 | return self::checkIdentifier($id, 'PPN'); |
846 | 862 | |
@@ -855,7 +871,8 @@ discard block |
||
855 | 871 | * |
856 | 872 | * @return mixed Session value for given key or NULL on failure |
857 | 873 | */ |
858 | - public static function loadFromSession($key) { |
|
874 | + public static function loadFromSession($key) |
|
875 | + { |
|
859 | 876 | |
860 | 877 | // Save parameter for logging purposes. |
861 | 878 | $_key = $key; |
@@ -910,7 +927,8 @@ discard block |
||
910 | 927 | * |
911 | 928 | * @return array Array of substituted "NEW..." identifiers and their actual UIDs. |
912 | 929 | */ |
913 | - public static function processDB(array $data = array (), array $cmd = array (), $reverseOrder = FALSE, $be_user = FALSE) { |
|
930 | + public static function processDB(array $data = array (), array $cmd = array (), $reverseOrder = FALSE, $be_user = FALSE) |
|
931 | + { |
|
914 | 932 | |
915 | 933 | // Instantiate TYPO3 core engine. |
916 | 934 | $tce = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\DataHandling\\DataHandler'); |
@@ -968,7 +986,8 @@ discard block |
||
968 | 986 | * |
969 | 987 | * @return array Array of substituted "NEW..." identifiers and their actual UIDs. |
970 | 988 | */ |
971 | - public static function processDBasAdmin(array $data = array (), array $cmd = array (), $reverseOrder = FALSE) { |
|
989 | + public static function processDBasAdmin(array $data = array (), array $cmd = array (), $reverseOrder = FALSE) |
|
990 | + { |
|
972 | 991 | |
973 | 992 | if (TYPO3_MODE === 'BE' && $GLOBALS['BE_USER']->isAdmin()) { |
974 | 993 | |
@@ -993,7 +1012,8 @@ discard block |
||
993 | 1012 | * |
994 | 1013 | * @return string All flash messages in the queue rendered as HTML. |
995 | 1014 | */ |
996 | - public static function renderFlashMessages() { |
|
1015 | + public static function renderFlashMessages() |
|
1016 | + { |
|
997 | 1017 | |
998 | 1018 | $flashMessageService = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\Messaging\\FlashMessageService'); |
999 | 1019 | |
@@ -1053,7 +1073,8 @@ discard block |
||
1053 | 1073 | * |
1054 | 1074 | * @return boolean TRUE on success, FALSE on failure |
1055 | 1075 | */ |
1056 | - public static function saveToSession($value, $key) { |
|
1076 | + public static function saveToSession($value, $key) |
|
1077 | + { |
|
1057 | 1078 | |
1058 | 1079 | // Save parameter for logging purposes. |
1059 | 1080 | $_key = $key; |
@@ -1113,7 +1134,8 @@ discard block |
||
1113 | 1134 | * |
1114 | 1135 | * @return string Localized label for $index_name |
1115 | 1136 | */ |
1116 | - public static function translate($index_name, $table, $pid) { |
|
1137 | + public static function translate($index_name, $table, $pid) |
|
1138 | + { |
|
1117 | 1139 | |
1118 | 1140 | // Save parameters for logging purposes. |
1119 | 1141 | $_index_name = $index_name; |
@@ -1271,7 +1293,8 @@ discard block |
||
1271 | 1293 | * |
1272 | 1294 | * @return string Additional WHERE clause |
1273 | 1295 | */ |
1274 | - public static function whereClause($table, $showHidden = FALSE) { |
|
1296 | + public static function whereClause($table, $showHidden = FALSE) |
|
1297 | + { |
|
1275 | 1298 | |
1276 | 1299 | if (TYPO3_MODE === 'FE') { |
1277 | 1300 | |
@@ -1329,6 +1352,8 @@ discard block |
||
1329 | 1352 | * |
1330 | 1353 | * @access private |
1331 | 1354 | */ |
1332 | - private function __construct() {} |
|
1355 | + private function __construct() |
|
1356 | + { |
|
1357 | +} |
|
1333 | 1358 | |
1334 | 1359 | } |