We could not synchronize checks via GitHub's checks API since Scrutinizer's GitHub App is not installed for this repository.
@@ -487,10 +487,10 @@ |
||
487 | 487 | } else { |
488 | 488 | |
489 | 489 | $subparts[$resArray['partof']][$resArray['volume_sorting']] = array ( |
490 | - 'u' => $resArray['uid'], |
|
491 | - 'h' => '', |
|
492 | - 's' => $sorting, |
|
493 | - 'p' => array () |
|
490 | + 'u' => $resArray['uid'], |
|
491 | + 'h' => '', |
|
492 | + 's' => $sorting, |
|
493 | + 'p' => array () |
|
494 | 494 | ); |
495 | 495 | |
496 | 496 | } |
@@ -27,7 +27,7 @@ discard block |
||
27 | 27 | * @var array |
28 | 28 | * @access protected |
29 | 29 | */ |
30 | - protected $hookObjects = array (); |
|
30 | + protected $hookObjects = array(); |
|
31 | 31 | |
32 | 32 | /** |
33 | 33 | * The main method of the PlugIn |
@@ -51,7 +51,7 @@ discard block |
||
51 | 51 | |
52 | 52 | if (TYPO3_DLOG) { |
53 | 53 | |
54 | - \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('[tx_dlf_collection->main('.$content.', [data])] Incomplete plugin configuration', $this->extKey, SYSLOG_SEVERITY_WARNING, $conf); |
|
54 | + \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('[tx_dlf_collection->main(' . $content . ', [data])] Incomplete plugin configuration', $this->extKey, SYSLOG_SEVERITY_WARNING, $conf); |
|
55 | 55 | |
56 | 56 | } |
57 | 57 | |
@@ -111,9 +111,9 @@ discard block |
||
111 | 111 | |
112 | 112 | } |
113 | 113 | |
114 | - $selectedCollections = 'tx_dlf_collections.uid IN ('.$GLOBALS['TYPO3_DB']->cleanIntList($this->conf['collections']).')'; |
|
114 | + $selectedCollections = 'tx_dlf_collections.uid IN (' . $GLOBALS['TYPO3_DB']->cleanIntList($this->conf['collections']) . ')'; |
|
115 | 115 | |
116 | - $orderBy = 'FIELD(tx_dlf_collections.uid,'.$GLOBALS['TYPO3_DB']->cleanIntList($this->conf['collections']).')'; |
|
116 | + $orderBy = 'FIELD(tx_dlf_collections.uid,' . $GLOBALS['TYPO3_DB']->cleanIntList($this->conf['collections']) . ')'; |
|
117 | 117 | |
118 | 118 | } |
119 | 119 | |
@@ -126,7 +126,7 @@ discard block |
||
126 | 126 | |
127 | 127 | if (!empty($GLOBALS['TSFE']->fe_user->user['uid'])) { |
128 | 128 | |
129 | - $showUserDefinedColls = ' AND tx_dlf_collections.fe_cruser_id='.intval($GLOBALS['TSFE']->fe_user->user['uid']); |
|
129 | + $showUserDefinedColls = ' AND tx_dlf_collections.fe_cruser_id=' . intval($GLOBALS['TSFE']->fe_user->user['uid']); |
|
130 | 130 | |
131 | 131 | } else { |
132 | 132 | |
@@ -140,7 +140,7 @@ discard block |
||
140 | 140 | $result = $GLOBALS['TYPO3_DB']->exec_SELECTquery( |
141 | 141 | 'tx_dlf_collections.index_name AS index_name,tx_dlf_collections.index_search as index_query,tx_dlf_collections.uid AS uid,tx_dlf_collections.sys_language_uid AS sys_language_uid,tx_dlf_collections.label AS label,tx_dlf_collections.thumbnail AS thumbnail,tx_dlf_collections.description AS description,tx_dlf_collections.priority AS priority', |
142 | 142 | 'tx_dlf_collections', |
143 | - $selectedCollections.$showUserDefinedColls.' AND tx_dlf_collections.pid='.intval($this->conf['pages']).' AND (tx_dlf_collections.sys_language_uid IN (-1,0) OR (tx_dlf_collections.sys_language_uid = '.$GLOBALS['TSFE']->sys_language_uid.' AND tx_dlf_collections.l18n_parent = 0))'.tx_dlf_helper::whereClause('tx_dlf_collections'), |
|
143 | + $selectedCollections . $showUserDefinedColls . ' AND tx_dlf_collections.pid=' . intval($this->conf['pages']) . ' AND (tx_dlf_collections.sys_language_uid IN (-1,0) OR (tx_dlf_collections.sys_language_uid = ' . $GLOBALS['TSFE']->sys_language_uid . ' AND tx_dlf_collections.l18n_parent = 0))' . tx_dlf_helper::whereClause('tx_dlf_collections'), |
|
144 | 144 | '', |
145 | 145 | $orderBy, |
146 | 146 | '' |
@@ -162,9 +162,9 @@ discard block |
||
162 | 162 | |
163 | 163 | // We only care about the UID and partOf in the results and want them sorted |
164 | 164 | $params['fields'] = 'uid,partof'; |
165 | - $params['sort'] = array ('uid' => 'asc'); |
|
165 | + $params['sort'] = array('uid' => 'asc'); |
|
166 | 166 | |
167 | - $collections = array (); |
|
167 | + $collections = array(); |
|
168 | 168 | |
169 | 169 | while ($collectionData = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($result)) { |
170 | 170 | |
@@ -180,7 +180,7 @@ discard block |
||
180 | 180 | |
181 | 181 | } |
182 | 182 | |
183 | - $markerArray = array (); |
|
183 | + $markerArray = array(); |
|
184 | 184 | |
185 | 185 | // Process results. |
186 | 186 | foreach ($collections as $collection) { |
@@ -189,20 +189,20 @@ discard block |
||
189 | 189 | |
190 | 190 | if ($collection['index_query'] != '') { |
191 | 191 | |
192 | - $solr_query .= '('.$collection['index_query'].')'; |
|
192 | + $solr_query .= '(' . $collection['index_query'] . ')'; |
|
193 | 193 | |
194 | 194 | } else { |
195 | 195 | |
196 | - $solr_query .= 'collection:("'.$collection['index_name'].'")'; |
|
196 | + $solr_query .= 'collection:("' . $collection['index_name'] . '")'; |
|
197 | 197 | |
198 | 198 | } |
199 | 199 | |
200 | - $partOfNothing = $solr->search_raw($solr_query.' AND partof:0 AND toplevel:true', $params); |
|
200 | + $partOfNothing = $solr->search_raw($solr_query . ' AND partof:0 AND toplevel:true', $params); |
|
201 | 201 | |
202 | - $partOfSomething = $solr->search_raw($solr_query.' AND NOT partof:0 AND toplevel:true', $params); |
|
202 | + $partOfSomething = $solr->search_raw($solr_query . ' AND NOT partof:0 AND toplevel:true', $params); |
|
203 | 203 | |
204 | 204 | // Titles are all documents that are "root" elements i.e. partof == 0 |
205 | - $collection['titles'] = array (); |
|
205 | + $collection['titles'] = array(); |
|
206 | 206 | |
207 | 207 | foreach ($partOfNothing as $doc) { |
208 | 208 | |
@@ -232,7 +232,7 @@ discard block |
||
232 | 232 | } while (!empty($markerArray[$_key])); |
233 | 233 | |
234 | 234 | // Merge plugin variables with new set of values. |
235 | - $additionalParams = array ('collection' => $collection['uid']); |
|
235 | + $additionalParams = array('collection' => $collection['uid']); |
|
236 | 236 | |
237 | 237 | if (is_array($this->piVars)) { |
238 | 238 | |
@@ -245,7 +245,7 @@ discard block |
||
245 | 245 | } |
246 | 246 | |
247 | 247 | // Build typolink configuration array. |
248 | - $conf = array ( |
|
248 | + $conf = array( |
|
249 | 249 | 'useCacheHash' => 1, |
250 | 250 | 'parameter' => $GLOBALS['TSFE']->id, |
251 | 251 | 'additionalParams' => \TYPO3\CMS\Core\Utility\GeneralUtility::implodeArrayForUrl($this->prefixId, $additionalParams, '', TRUE, FALSE) |
@@ -257,9 +257,9 @@ discard block |
||
257 | 257 | // Add feed link if applicable. |
258 | 258 | if (!empty($this->conf['targetFeed'])) { |
259 | 259 | |
260 | - $img = '<img src="'.\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::siteRelPath($this->extKey).'res/icons/txdlffeeds.png" alt="'.$this->pi_getLL('feedAlt', '', TRUE).'" title="'.$this->pi_getLL('feedTitle', '', TRUE).'" />'; |
|
260 | + $img = '<img src="' . \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::siteRelPath($this->extKey) . 'res/icons/txdlffeeds.png" alt="' . $this->pi_getLL('feedAlt', '', TRUE) . '" title="' . $this->pi_getLL('feedTitle', '', TRUE) . '" />'; |
|
261 | 261 | |
262 | - $markerArray[$_key]['###FEED###'] = $this->pi_linkTP($img, array ($this->prefixId => array ('collection' => $collection['uid'])), FALSE, $this->conf['targetFeed']); |
|
262 | + $markerArray[$_key]['###FEED###'] = $this->pi_linkTP($img, array($this->prefixId => array('collection' => $collection['uid'])), FALSE, $this->conf['targetFeed']); |
|
263 | 263 | |
264 | 264 | } else { |
265 | 265 | |
@@ -270,7 +270,7 @@ discard block |
||
270 | 270 | // Add thumbnail. |
271 | 271 | if (!empty($collection['thumbnail'])) { |
272 | 272 | |
273 | - $markerArray[$_key]['###THUMBNAIL###'] = '<img alt="" title="'.htmlspecialchars($collection['label']).'" src="'.$collection['thumbnail'].'" />'; |
|
273 | + $markerArray[$_key]['###THUMBNAIL###'] = '<img alt="" title="' . htmlspecialchars($collection['label']) . '" src="' . $collection['thumbnail'] . '" />'; |
|
274 | 274 | |
275 | 275 | } else { |
276 | 276 | |
@@ -284,11 +284,11 @@ discard block |
||
284 | 284 | // Build statistic's output. |
285 | 285 | $labelTitles = $this->pi_getLL((count($collection['titles']) > 1 ? 'titles' : 'title'), '', FALSE); |
286 | 286 | |
287 | - $markerArray[$_key]['###COUNT_TITLES###'] = htmlspecialchars(count($collection['titles']).$labelTitles); |
|
287 | + $markerArray[$_key]['###COUNT_TITLES###'] = htmlspecialchars(count($collection['titles']) . $labelTitles); |
|
288 | 288 | |
289 | 289 | $labelVolumes = $this->pi_getLL((count($collection['volumes']) > 1 ? 'volumes' : 'volume'), '', FALSE); |
290 | 290 | |
291 | - $markerArray[$_key]['###COUNT_VOLUMES###'] = htmlspecialchars(count($collection['volumes']).$labelVolumes); |
|
291 | + $markerArray[$_key]['###COUNT_VOLUMES###'] = htmlspecialchars(count($collection['volumes']) . $labelVolumes); |
|
292 | 292 | |
293 | 293 | } |
294 | 294 | |
@@ -353,7 +353,7 @@ discard block |
||
353 | 353 | $collection = $GLOBALS['TYPO3_DB']->exec_SELECTquery( |
354 | 354 | 'tx_dlf_collections.index_name AS index_name, tx_dlf_collections.index_search as index_query, tx_dlf_collections.label AS collLabel, tx_dlf_collections.description AS collDesc, tx_dlf_collections.thumbnail AS collThumb, tx_dlf_collections.fe_cruser_id', |
355 | 355 | 'tx_dlf_collections', |
356 | - 'tx_dlf_collections.pid='.intval($this->conf['pages']).' AND tx_dlf_collections.uid='.intval($id).$additionalWhere.tx_dlf_helper::whereClause('tx_dlf_collections'), |
|
356 | + 'tx_dlf_collections.pid=' . intval($this->conf['pages']) . ' AND tx_dlf_collections.uid=' . intval($id) . $additionalWhere . tx_dlf_helper::whereClause('tx_dlf_collections'), |
|
357 | 357 | '', |
358 | 358 | '', |
359 | 359 | '1' |
@@ -366,11 +366,11 @@ discard block |
||
366 | 366 | |
367 | 367 | if ($collectionData['index_query'] != '') { |
368 | 368 | |
369 | - $solr_query .= '('.$collectionData['index_query'].')'; |
|
369 | + $solr_query .= '(' . $collectionData['index_query'] . ')'; |
|
370 | 370 | |
371 | 371 | } else { |
372 | 372 | |
373 | - $solr_query .= 'collection:("'.$collectionData['index_name'].'") AND toplevel:true'; |
|
373 | + $solr_query .= 'collection:("' . $collectionData['index_name'] . '") AND toplevel:true'; |
|
374 | 374 | |
375 | 375 | } |
376 | 376 | |
@@ -380,7 +380,7 @@ discard block |
||
380 | 380 | |
381 | 381 | if (TYPO3_DLOG) { |
382 | 382 | |
383 | - \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('[tx_dlf_collection->showSingleCollection('.intval($id).')] Apache Solr not available', $this->extKey, SYSLOG_SEVERITY_ERROR); |
|
383 | + \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('[tx_dlf_collection->showSingleCollection(' . intval($id) . ')] Apache Solr not available', $this->extKey, SYSLOG_SEVERITY_ERROR); |
|
384 | 384 | |
385 | 385 | } |
386 | 386 | |
@@ -389,7 +389,7 @@ discard block |
||
389 | 389 | } |
390 | 390 | |
391 | 391 | $params['fields'] = 'uid'; |
392 | - $params['sort'] = array ('uid' => 'asc'); |
|
392 | + $params['sort'] = array('uid' => 'asc'); |
|
393 | 393 | |
394 | 394 | $solrResult = $solr->search_raw($solr_query, $params); |
395 | 395 | |
@@ -412,17 +412,17 @@ discard block |
||
412 | 412 | $documents = $GLOBALS['TYPO3_DB']->exec_SELECTquery( |
413 | 413 | 'tx_dlf_documents.uid AS uid, tx_dlf_documents.metadata_sorting AS metadata_sorting, tx_dlf_documents.volume_sorting AS volume_sorting, tx_dlf_documents.partof AS partof', |
414 | 414 | 'tx_dlf_documents', |
415 | - 'tx_dlf_documents.pid='.intval($this->conf['pages']).' AND tx_dlf_documents.uid IN ('.implode(',', $documentSet).')'.tx_dlf_helper::whereClause('tx_dlf_documents'), |
|
415 | + 'tx_dlf_documents.pid=' . intval($this->conf['pages']) . ' AND tx_dlf_documents.uid IN (' . implode(',', $documentSet) . ')' . tx_dlf_helper::whereClause('tx_dlf_documents'), |
|
416 | 416 | '', |
417 | 417 | '', |
418 | 418 | '' |
419 | 419 | ); |
420 | 420 | |
421 | - $toplevel = array (); |
|
421 | + $toplevel = array(); |
|
422 | 422 | |
423 | - $subparts = array (); |
|
423 | + $subparts = array(); |
|
424 | 424 | |
425 | - $listMetadata = array (); |
|
425 | + $listMetadata = array(); |
|
426 | 426 | |
427 | 427 | // Process results. |
428 | 428 | while ($resArray = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($documents)) { |
@@ -435,15 +435,15 @@ discard block |
||
435 | 435 | |
436 | 436 | if (empty($listMetadata)) { |
437 | 437 | |
438 | - $listMetadata = array ( |
|
438 | + $listMetadata = array( |
|
439 | 439 | 'label' => !empty($l10nOverlay['label']) ? htmlspecialchars($l10nOverlay['label']) : htmlspecialchars($collectionData['collLabel']), |
440 | 440 | 'description' => !empty($l10nOverlay['description']) ? $this->pi_RTEcssText($l10nOverlay['description']) : $this->pi_RTEcssText($collectionData['collDesc']), |
441 | 441 | 'thumbnail' => htmlspecialchars($collectionData['collThumb']), |
442 | - 'options' => array ( |
|
442 | + 'options' => array( |
|
443 | 443 | 'source' => 'collection', |
444 | 444 | 'select' => $id, |
445 | 445 | 'userid' => $collectionData['userid'], |
446 | - 'params' => array ('filterquery' => array (array ('query' => 'collection_faceting:("'.$collectionData['index_name'].'")'))), |
|
446 | + 'params' => array('filterquery' => array(array('query' => 'collection_faceting:("' . $collectionData['index_name'] . '")'))), |
|
447 | 447 | 'core' => '', |
448 | 448 | 'pid' => $this->conf['pages'], |
449 | 449 | 'order' => 'title', |
@@ -477,20 +477,20 @@ discard block |
||
477 | 477 | // Split toplevel documents from volumes. |
478 | 478 | if ($resArray['partof'] == 0) { |
479 | 479 | |
480 | - $toplevel[$resArray['uid']] = array ( |
|
480 | + $toplevel[$resArray['uid']] = array( |
|
481 | 481 | 'u' => $resArray['uid'], |
482 | 482 | 'h' => '', |
483 | 483 | 's' => $sorting, |
484 | - 'p' => array () |
|
484 | + 'p' => array() |
|
485 | 485 | ); |
486 | 486 | |
487 | 487 | } else { |
488 | 488 | |
489 | - $subparts[$resArray['partof']][$resArray['volume_sorting']] = array ( |
|
489 | + $subparts[$resArray['partof']][$resArray['volume_sorting']] = array( |
|
490 | 490 | 'u' => $resArray['uid'], |
491 | 491 | 'h' => '', |
492 | 492 | 's' => $sorting, |
493 | - 'p' => array () |
|
493 | + 'p' => array() |
|
494 | 494 | ); |
495 | 495 | |
496 | 496 | } |
@@ -535,7 +535,7 @@ discard block |
||
535 | 535 | \TYPO3\CMS\Core\Utility\GeneralUtility::cleanOutputBuffers(); |
536 | 536 | |
537 | 537 | // Send headers. |
538 | - header('Location: '.\TYPO3\CMS\Core\Utility\GeneralUtility::locationHeaderUrl($this->cObj->typoLink_URL(array ('parameter' => $this->conf['targetPid'])))); |
|
538 | + header('Location: ' . \TYPO3\CMS\Core\Utility\GeneralUtility::locationHeaderUrl($this->cObj->typoLink_URL(array('parameter' => $this->conf['targetPid'])))); |
|
539 | 539 | |
540 | 540 | // Flush output buffer and end script processing. |
541 | 541 | ob_end_flush(); |