We could not synchronize checks via GitHub's checks API since Scrutinizer's GitHub App is not installed for this repository.
@@ -54,7 +54,7 @@ discard block |
||
| 54 | 54 | } |
| 55 | 55 | |
| 56 | 56 | // Build data array. |
| 57 | - $data = array ( |
|
| 57 | + $data = array( |
|
| 58 | 58 | 'conf' => $this->conf, |
| 59 | 59 | 'piVars' => $this->piVars, |
| 60 | 60 | ); |
@@ -73,7 +73,7 @@ discard block |
||
| 73 | 73 | |
| 74 | 74 | $cObj->data = $data; |
| 75 | 75 | |
| 76 | - $content .= $this->cObj->substituteMarkerArray($subpart, array ('###TOOL###' => $cObj->cObjGetSingle($GLOBALS['TSFE']->tmpl->setup['plugin.'][$tool], $GLOBALS['TSFE']->tmpl->setup['plugin.'][$tool.'.']))); |
|
| 76 | + $content .= $this->cObj->substituteMarkerArray($subpart, array('###TOOL###' => $cObj->cObjGetSingle($GLOBALS['TSFE']->tmpl->setup['plugin.'][$tool], $GLOBALS['TSFE']->tmpl->setup['plugin.'][$tool.'.']))); |
|
| 77 | 77 | |
| 78 | 78 | } |
| 79 | 79 | |
@@ -27,7 +27,7 @@ discard block |
||
| 27 | 27 | * @var array |
| 28 | 28 | * @access protected |
| 29 | 29 | */ |
| 30 | - protected $activeEntries = array (); |
|
| 30 | + protected $activeEntries = array(); |
|
| 31 | 31 | |
| 32 | 32 | /** |
| 33 | 33 | * This builds an array for one menu entry |
@@ -41,7 +41,7 @@ discard block |
||
| 41 | 41 | */ |
| 42 | 42 | protected function getMenuEntry(array $entry, $recursive = FALSE) { |
| 43 | 43 | |
| 44 | - $entryArray = array (); |
|
| 44 | + $entryArray = array(); |
|
| 45 | 45 | |
| 46 | 46 | // Set "title", "volume", "type" and "pagination" from $entry array. |
| 47 | 47 | $entryArray['title'] = $entry['label']; |
@@ -63,37 +63,37 @@ discard block |
||
| 63 | 63 | // Build menu links based on the $entry['points'] array. |
| 64 | 64 | if (!empty($entry['points']) && \TYPO3\CMS\Core\Utility\MathUtility::canBeInterpretedAsInteger($entry['points'])) { |
| 65 | 65 | |
| 66 | - $entryArray['_OVERRIDE_HREF'] = $this->pi_linkTP_keepPIvars_url(array ('page' => $entry['points']), TRUE, FALSE, $this->conf['targetPid']); |
|
| 66 | + $entryArray['_OVERRIDE_HREF'] = $this->pi_linkTP_keepPIvars_url(array('page' => $entry['points']), TRUE, FALSE, $this->conf['targetPid']); |
|
| 67 | 67 | |
| 68 | 68 | $entryArray['doNotLinkIt'] = 0; |
| 69 | 69 | |
| 70 | 70 | if ($this->conf['basketButton']) { |
| 71 | 71 | |
| 72 | - $entryArray['basketButtonHref'] = '<a href="'.$this->pi_linkTP_keepPIvars_url(array ('addToBasket' => 'toc', 'logId' => $entry['id'], 'startpage' => $entry['points']), TRUE, FALSE, $this->conf['targetBasket']).'">'.$this->pi_getLL('basketButton', '', TRUE).'</a>'; |
|
| 72 | + $entryArray['basketButtonHref'] = '<a href="'.$this->pi_linkTP_keepPIvars_url(array('addToBasket' => 'toc', 'logId' => $entry['id'], 'startpage' => $entry['points']), TRUE, FALSE, $this->conf['targetBasket']).'">'.$this->pi_getLL('basketButton', '', TRUE).'</a>'; |
|
| 73 | 73 | |
| 74 | 74 | } |
| 75 | 75 | |
| 76 | 76 | } elseif (!empty($entry['points']) && is_string($entry['points'])) { |
| 77 | 77 | |
| 78 | - $entryArray['_OVERRIDE_HREF'] = $this->pi_linkTP_keepPIvars_url(array ('id' => $entry['points'], 'page' => 1), TRUE, FALSE, $this->conf['targetPid']); |
|
| 78 | + $entryArray['_OVERRIDE_HREF'] = $this->pi_linkTP_keepPIvars_url(array('id' => $entry['points'], 'page' => 1), TRUE, FALSE, $this->conf['targetPid']); |
|
| 79 | 79 | |
| 80 | 80 | $entryArray['doNotLinkIt'] = 0; |
| 81 | 81 | |
| 82 | 82 | if ($this->conf['basketButton']) { |
| 83 | 83 | |
| 84 | - $entryArray['basketButtonHref'] = '<a href="'.$this->pi_linkTP_keepPIvars_url(array ('addToBasket' => 'toc', 'logId' => $entry['id'], 'startpage' => $entry['points']), TRUE, FALSE, $this->conf['targetBasket']).'">'.$this->pi_getLL('basketButton', '', TRUE).'</a>'; |
|
| 84 | + $entryArray['basketButtonHref'] = '<a href="'.$this->pi_linkTP_keepPIvars_url(array('addToBasket' => 'toc', 'logId' => $entry['id'], 'startpage' => $entry['points']), TRUE, FALSE, $this->conf['targetBasket']).'">'.$this->pi_getLL('basketButton', '', TRUE).'</a>'; |
|
| 85 | 85 | |
| 86 | 86 | } |
| 87 | 87 | |
| 88 | 88 | } elseif (!empty($entry['targetUid'])) { |
| 89 | 89 | |
| 90 | - $entryArray['_OVERRIDE_HREF'] = $this->pi_linkTP_keepPIvars_url(array ('id' => $entry['targetUid'], 'page' => 1), TRUE, FALSE, $this->conf['targetPid']); |
|
| 90 | + $entryArray['_OVERRIDE_HREF'] = $this->pi_linkTP_keepPIvars_url(array('id' => $entry['targetUid'], 'page' => 1), TRUE, FALSE, $this->conf['targetPid']); |
|
| 91 | 91 | |
| 92 | 92 | $entryArray['doNotLinkIt'] = 0; |
| 93 | 93 | |
| 94 | 94 | if ($this->conf['basketButton']) { |
| 95 | 95 | |
| 96 | - $entryArray['basketButtonHref'] = '<a href="'.$this->pi_linkTP_keepPIvars_url(array ('addToBasket' => 'toc', 'logId' => $entry['id'], 'startpage' => $entry['targetUid']), TRUE, FALSE, $this->conf['targetBasket']).'">'.$this->pi_getLL('basketButton', '', TRUE).'</a>'; |
|
| 96 | + $entryArray['basketButtonHref'] = '<a href="'.$this->pi_linkTP_keepPIvars_url(array('addToBasket' => 'toc', 'logId' => $entry['id'], 'startpage' => $entry['targetUid']), TRUE, FALSE, $this->conf['targetBasket']).'">'.$this->pi_getLL('basketButton', '', TRUE).'</a>'; |
|
| 97 | 97 | |
| 98 | 98 | } |
| 99 | 99 | |
@@ -116,7 +116,7 @@ discard block |
||
| 116 | 116 | // 4. Current menu node has no corresponding images |
| 117 | 117 | if (!empty($this->conf['menuConf.']['expAll']) || $entryArray['ITEM_STATE'] == 'CUR' || is_string($entry['points']) || empty($this->doc->smLinks['l2p'][$entry['id']])) { |
| 118 | 118 | |
| 119 | - $entryArray['_SUB_MENU'] = array (); |
|
| 119 | + $entryArray['_SUB_MENU'] = array(); |
|
| 120 | 120 | |
| 121 | 121 | foreach ($entry['children'] as $child) { |
| 122 | 122 | |
@@ -180,7 +180,7 @@ discard block |
||
| 180 | 180 | |
| 181 | 181 | } |
| 182 | 182 | |
| 183 | - $TSconfig = array (); |
|
| 183 | + $TSconfig = array(); |
|
| 184 | 184 | |
| 185 | 185 | $TSconfig['special'] = 'userfunction'; |
| 186 | 186 | |
@@ -216,15 +216,15 @@ discard block |
||
| 216 | 216 | if ($this->doc === NULL) { |
| 217 | 217 | |
| 218 | 218 | // Quit without doing anything if required variables are not set. |
| 219 | - return array (); |
|
| 219 | + return array(); |
|
| 220 | 220 | |
| 221 | 221 | } else { |
| 222 | 222 | |
| 223 | 223 | // Set default values for page if not set. |
| 224 | 224 | // $this->piVars['page'] may be integer or string (physical structure @ID) |
| 225 | - if ( (int)$this->piVars['page'] > 0 || empty($this->piVars['page'])) { |
|
| 225 | + if ((int) $this->piVars['page'] > 0 || empty($this->piVars['page'])) { |
|
| 226 | 226 | |
| 227 | - $this->piVars['page'] = \TYPO3\CMS\Core\Utility\MathUtility::forceIntegerInRange((int)$this->piVars['page'], 1, $this->doc->numPages, 1); |
|
| 227 | + $this->piVars['page'] = \TYPO3\CMS\Core\Utility\MathUtility::forceIntegerInRange((int) $this->piVars['page'], 1, $this->doc->numPages, 1); |
|
| 228 | 228 | |
| 229 | 229 | } else { |
| 230 | 230 | |
@@ -236,7 +236,7 @@ discard block |
||
| 236 | 236 | |
| 237 | 237 | } |
| 238 | 238 | |
| 239 | - $menuArray = array (); |
|
| 239 | + $menuArray = array(); |
|
| 240 | 240 | |
| 241 | 241 | // Does the document have physical elements or is it an external file? |
| 242 | 242 | if ($this->doc->physicalStructure || !\TYPO3\CMS\Core\Utility\MathUtility::canBeInterpretedAsInteger($this->doc->uid)) { |
@@ -293,11 +293,11 @@ discard block |
||
| 293 | 293 | |
| 294 | 294 | $menuArray[0]['ITEM_STATE'] = 'CURIFSUB'; |
| 295 | 295 | |
| 296 | - $menuArray[0]['_SUB_MENU'] = array (); |
|
| 296 | + $menuArray[0]['_SUB_MENU'] = array(); |
|
| 297 | 297 | |
| 298 | 298 | while ($resArray = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($result)) { |
| 299 | 299 | |
| 300 | - $entry = array ( |
|
| 300 | + $entry = array( |
|
| 301 | 301 | 'label' => $resArray['title'], |
| 302 | 302 | 'type' => $resArray['type'], |
| 303 | 303 | 'volume' => $resArray['volume'], |
@@ -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 |
@@ -170,7 +170,7 @@ discard block |
||
| 170 | 170 | '' |
| 171 | 171 | ); |
| 172 | 172 | |
| 173 | - $volumes = array (); |
|
| 173 | + $volumes = array(); |
|
| 174 | 174 | |
| 175 | 175 | while ($resArrayVolumes = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($resultVolumes)) { |
| 176 | 176 | |
@@ -189,7 +189,7 @@ discard block |
||
| 189 | 189 | } while (!empty($markerArray[$_key])); |
| 190 | 190 | |
| 191 | 191 | // Merge plugin variables with new set of values. |
| 192 | - $additionalParams = array ('collection' => $resArray['uid']); |
|
| 192 | + $additionalParams = array('collection' => $resArray['uid']); |
|
| 193 | 193 | |
| 194 | 194 | if (is_array($this->piVars)) { |
| 195 | 195 | |
@@ -202,7 +202,7 @@ discard block |
||
| 202 | 202 | } |
| 203 | 203 | |
| 204 | 204 | // Build typolink configuration array. |
| 205 | - $conf = array ( |
|
| 205 | + $conf = array( |
|
| 206 | 206 | 'useCacheHash' => 1, |
| 207 | 207 | 'parameter' => $GLOBALS['TSFE']->id, |
| 208 | 208 | 'additionalParams' => \TYPO3\CMS\Core\Utility\GeneralUtility::implodeArrayForUrl($this->prefixId, $additionalParams, '', TRUE, FALSE) |
@@ -216,7 +216,7 @@ discard block |
||
| 216 | 216 | |
| 217 | 217 | $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).'" />'; |
| 218 | 218 | |
| 219 | - $markerArray[$_key]['###FEED###'] = $this->pi_linkTP($img, array ($this->prefixId => array ('collection' => $resArray['uid'])), FALSE, $this->conf['targetFeed']); |
|
| 219 | + $markerArray[$_key]['###FEED###'] = $this->pi_linkTP($img, array($this->prefixId => array('collection' => $resArray['uid'])), FALSE, $this->conf['targetFeed']); |
|
| 220 | 220 | |
| 221 | 221 | } else { |
| 222 | 222 | |
@@ -320,26 +320,26 @@ discard block |
||
| 320 | 320 | '' |
| 321 | 321 | ); |
| 322 | 322 | |
| 323 | - $toplevel = array (); |
|
| 323 | + $toplevel = array(); |
|
| 324 | 324 | |
| 325 | - $subparts = array (); |
|
| 325 | + $subparts = array(); |
|
| 326 | 326 | |
| 327 | - $listMetadata = array (); |
|
| 327 | + $listMetadata = array(); |
|
| 328 | 328 | |
| 329 | 329 | // Process results. |
| 330 | 330 | while ($resArray = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($result)) { |
| 331 | 331 | |
| 332 | 332 | if (empty($listMetadata)) { |
| 333 | 333 | |
| 334 | - $listMetadata = array ( |
|
| 334 | + $listMetadata = array( |
|
| 335 | 335 | 'label' => htmlspecialchars($resArray['collLabel']), |
| 336 | 336 | 'description' => $this->pi_RTEcssText($resArray['collDesc']), |
| 337 | 337 | 'thumbnail' => htmlspecialchars($resArray['collThumb']), |
| 338 | - 'options' => array ( |
|
| 338 | + 'options' => array( |
|
| 339 | 339 | 'source' => 'collection', |
| 340 | 340 | 'select' => $id, |
| 341 | 341 | 'userid' => $resArray['userid'], |
| 342 | - 'params' => array ('fq' => array ('collection_faceting:("'.$resArray['index_name'].'")')), |
|
| 342 | + 'params' => array('fq' => array('collection_faceting:("'.$resArray['index_name'].'")')), |
|
| 343 | 343 | 'core' => '', |
| 344 | 344 | 'pid' => $this->conf['pages'], |
| 345 | 345 | 'order' => 'title', |
@@ -373,11 +373,11 @@ discard block |
||
| 373 | 373 | |
| 374 | 374 | } |
| 375 | 375 | |
| 376 | - $toplevel[$resArray['uid']] = array ( |
|
| 376 | + $toplevel[$resArray['uid']] = array( |
|
| 377 | 377 | 'u' => $resArray['uid'], |
| 378 | 378 | 'h' => '', |
| 379 | 379 | 's' => $sorting, |
| 380 | - 'p' => array () |
|
| 380 | + 'p' => array() |
|
| 381 | 381 | ); |
| 382 | 382 | |
| 383 | 383 | } else { |
@@ -397,7 +397,7 @@ discard block |
||
| 397 | 397 | |
| 398 | 398 | foreach ($parts as $part) { |
| 399 | 399 | |
| 400 | - $toplevel[$partof]['p'][] = array ('u' => $part); |
|
| 400 | + $toplevel[$partof]['p'][] = array('u' => $part); |
|
| 401 | 401 | |
| 402 | 402 | } |
| 403 | 403 | |
@@ -420,7 +420,7 @@ discard block |
||
| 420 | 420 | \TYPO3\CMS\Core\Utility\GeneralUtility::cleanOutputBuffers(); |
| 421 | 421 | |
| 422 | 422 | // Send headers. |
| 423 | - header('Location: '.\TYPO3\CMS\Core\Utility\GeneralUtility::locationHeaderUrl($this->cObj->typoLink_URL(array ('parameter' => $this->conf['targetPid'])))); |
|
| 423 | + header('Location: '.\TYPO3\CMS\Core\Utility\GeneralUtility::locationHeaderUrl($this->cObj->typoLink_URL(array('parameter' => $this->conf['targetPid'])))); |
|
| 424 | 424 | |
| 425 | 425 | // Flush output buffer and end script processing. |
| 426 | 426 | ob_end_flush(); |
@@ -198,7 +198,7 @@ discard block |
||
| 198 | 198 | // Get operator options. |
| 199 | 199 | $operatorOptions = ''; |
| 200 | 200 | |
| 201 | - foreach (array ('AND', 'OR', 'NOT') as $operator) { |
|
| 201 | + foreach (array('AND', 'OR', 'NOT') as $operator) { |
|
| 202 | 202 | |
| 203 | 203 | $operatorOptions .= '<option class="tx-dlf-search-operator-option tx-dlf-search-operator-'.$operator.'" value="'.$operator.'">'.$this->pi_getLL($operator, '', TRUE).'</option>'; |
| 204 | 204 | |
@@ -217,7 +217,7 @@ discard block |
||
| 217 | 217 | |
| 218 | 218 | for ($i = 0; $i < $this->conf['extendedSlotCount']; $i++) { |
| 219 | 219 | |
| 220 | - $markerArray = array ( |
|
| 220 | + $markerArray = array( |
|
| 221 | 221 | '###EXT_SEARCH_OPERATOR###' => '<select class="tx-dlf-search-operator tx-dlf-search-operator-'.$i.'" name="'.$this->prefixId.'[extOperator]['.$i.']">'.$operatorOptions.'</select>', |
| 222 | 222 | '###EXT_SEARCH_FIELDSELECTOR###' => '<select class="tx-dlf-search-field tx-dlf-search-field-'.$i.'" name="'.$this->prefixId.'[extField]['.$i.']">'.$fieldSelectorOptions.'</select>', |
| 223 | 223 | '###EXT_SEARCH_FIELDQUERY###' => '<input class="tx-dlf-search-query tx-dlf-search-query-'.$i.'" type="text" name="'.$this->prefixId.'[extQuery]['.$i.']" />' |
@@ -261,7 +261,7 @@ discard block |
||
| 261 | 261 | } |
| 262 | 262 | |
| 263 | 263 | // Get facets from plugin configuration. |
| 264 | - $facets = array (); |
|
| 264 | + $facets = array(); |
|
| 265 | 265 | |
| 266 | 266 | foreach (\TYPO3\CMS\Core\Utility\GeneralUtility::trimExplode(',', $this->conf['facets'], TRUE) as $facet) { |
| 267 | 267 | |
@@ -270,7 +270,7 @@ discard block |
||
| 270 | 270 | } |
| 271 | 271 | |
| 272 | 272 | // Render facets menu. |
| 273 | - $TSconfig = array (); |
|
| 273 | + $TSconfig = array(); |
|
| 274 | 274 | |
| 275 | 275 | $TSconfig['special'] = 'userfunction'; |
| 276 | 276 | |
@@ -302,13 +302,13 @@ discard block |
||
| 302 | 302 | // Check for plugin configuration. |
| 303 | 303 | if (!empty($this->conf['fulltext'])) { |
| 304 | 304 | |
| 305 | - $output .= ' <input class="tx-dlf-search-fulltext" id="tx-dlf-search-fulltext-no" type="radio" name="' . $this->prefixId . '[fulltext]" value="0" ' . ($isFulltextSearch == 0 ? 'checked="checked"' : '') .' />'; |
|
| 305 | + $output .= ' <input class="tx-dlf-search-fulltext" id="tx-dlf-search-fulltext-no" type="radio" name="'.$this->prefixId.'[fulltext]" value="0" '.($isFulltextSearch == 0 ? 'checked="checked"' : '').' />'; |
|
| 306 | 306 | |
| 307 | - $output .= ' <label for="tx-dlf-search-fulltext-no">' . $this->pi_getLL('label.inMetadata', '') . '</label>'; |
|
| 307 | + $output .= ' <label for="tx-dlf-search-fulltext-no">'.$this->pi_getLL('label.inMetadata', '').'</label>'; |
|
| 308 | 308 | |
| 309 | - $output .= ' <input class="tx-dlf-search-fulltext" id="tx-dlf-search-fulltext-yes" type="radio" name="' . $this->prefixId . '[fulltext]" value="1" ' . ($isFulltextSearch == 1 ? 'checked="checked"' : '') .'/>'; |
|
| 309 | + $output .= ' <input class="tx-dlf-search-fulltext" id="tx-dlf-search-fulltext-yes" type="radio" name="'.$this->prefixId.'[fulltext]" value="1" '.($isFulltextSearch == 1 ? 'checked="checked"' : '').'/>'; |
|
| 310 | 310 | |
| 311 | - $output .= ' <label for="tx-dlf-search-fulltext-yes">' . $this->pi_getLL('label.inFulltext', '') . '</label>'; |
|
| 311 | + $output .= ' <label for="tx-dlf-search-fulltext-yes">'.$this->pi_getLL('label.inFulltext', '').'</label>'; |
|
| 312 | 312 | |
| 313 | 313 | } |
| 314 | 314 | |
@@ -381,7 +381,7 @@ discard block |
||
| 381 | 381 | //remove ($count) for selected facet in template |
| 382 | 382 | $entryArray['count'] = FALSE; |
| 383 | 383 | //build link to delete selected facet |
| 384 | - $entryArray['_OVERRIDE_HREF'] = $this->pi_linkTP_keepPIvars_url(array ('query' => $search['query'], 'fq' => $search['params']['fq'])); |
|
| 384 | + $entryArray['_OVERRIDE_HREF'] = $this->pi_linkTP_keepPIvars_url(array('query' => $search['query'], 'fq' => $search['params']['fq'])); |
|
| 385 | 385 | $entryArray['title'] = sprintf($this->pi_getLL('resetFacet', ''), $entryArray['title']); |
| 386 | 386 | } |
| 387 | 387 | |
@@ -394,7 +394,7 @@ discard block |
||
| 394 | 394 | |
| 395 | 395 | } |
| 396 | 396 | |
| 397 | - $entryArray['_OVERRIDE_HREF'] = $this->pi_linkTP_keepPIvars_url(array ('query' => $search['query'], 'fq' => $search['params']['fq'])); |
|
| 397 | + $entryArray['_OVERRIDE_HREF'] = $this->pi_linkTP_keepPIvars_url(array('query' => $search['query'], 'fq' => $search['params']['fq'])); |
|
| 398 | 398 | |
| 399 | 399 | return $entryArray; |
| 400 | 400 | |
@@ -466,13 +466,13 @@ discard block |
||
| 466 | 466 | } |
| 467 | 467 | |
| 468 | 468 | // Configure @action URL for form. |
| 469 | - $linkConf = array ( |
|
| 469 | + $linkConf = array( |
|
| 470 | 470 | 'parameter' => $GLOBALS['TSFE']->id, |
| 471 | 471 | 'forceAbsoluteUrl' => 1 |
| 472 | 472 | ); |
| 473 | 473 | |
| 474 | 474 | // Fill markers. |
| 475 | - $markerArray = array ( |
|
| 475 | + $markerArray = array( |
|
| 476 | 476 | '###ACTION_URL###' => $this->cObj->typoLink_URL($linkConf), |
| 477 | 477 | '###LABEL_QUERY###' => (!empty($search['query']) ? $search['query'] : $this->pi_getLL('label.query')), |
| 478 | 478 | '###LABEL_SUBMIT###' => $this->pi_getLL('label.submit'), |
@@ -520,15 +520,15 @@ discard block |
||
| 520 | 520 | } |
| 521 | 521 | |
| 522 | 522 | // Prepare query parameters. |
| 523 | - $params = array (); |
|
| 523 | + $params = array(); |
|
| 524 | 524 | |
| 525 | - $matches = array (); |
|
| 525 | + $matches = array(); |
|
| 526 | 526 | |
| 527 | 527 | // Set search query. |
| 528 | 528 | if ((!empty($this->conf['fulltext']) && !empty($this->piVars['fulltext'])) || preg_match('/fulltext:\((.*)\)/', $this->piVars['query'], $matches)) { |
| 529 | 529 | |
| 530 | 530 | // If the query already is a fulltext query e.g using the facets |
| 531 | - $this->piVars['query'] = empty($matches[1])?$this->piVars['query']:$matches[1]; |
|
| 531 | + $this->piVars['query'] = empty($matches[1]) ? $this->piVars['query'] : $matches[1]; |
|
| 532 | 532 | |
| 533 | 533 | // Search in fulltext field if applicable. query must not be empty! |
| 534 | 534 | if (!empty($this->piVars['query'])) { |
@@ -617,7 +617,7 @@ discard block |
||
| 617 | 617 | |
| 618 | 618 | $collIds = explode(',', $this->conf['collections']); |
| 619 | 619 | |
| 620 | - $collIndexNames = array (); |
|
| 620 | + $collIndexNames = array(); |
|
| 621 | 621 | |
| 622 | 622 | foreach ($collIds as $collId) { |
| 623 | 623 | |
@@ -640,7 +640,7 @@ discard block |
||
| 640 | 640 | // Perform search. |
| 641 | 641 | $results = $solr->search($query); |
| 642 | 642 | |
| 643 | - $results->metadata = array ( |
|
| 643 | + $results->metadata = array( |
|
| 644 | 644 | 'label' => $label, |
| 645 | 645 | 'description' => '<p class="tx-dlf-search-numHits">'.htmlspecialchars(sprintf($this->pi_getLL('hits', ''), $solr->numberOfHits, count($results))).'</p>', |
| 646 | 646 | 'thumbnail' => '', |
@@ -655,15 +655,15 @@ discard block |
||
| 655 | 655 | \TYPO3\CMS\Core\Utility\GeneralUtility::cleanOutputBuffers(); |
| 656 | 656 | |
| 657 | 657 | // Jump directly to the page view, if there is only one result and it is configured |
| 658 | - if($results->count() == 1 && !empty($this->conf['showSingleResult'])) { |
|
| 658 | + if ($results->count() == 1 && !empty($this->conf['showSingleResult'])) { |
|
| 659 | 659 | |
| 660 | 660 | $linkConf['parameter'] = $this->conf['targetPidPageView']; |
| 661 | 661 | |
| 662 | 662 | $linkConf['additionalParams'] = \TYPO3\CMS\Core\Utility\GeneralUtility::implodeArrayForUrl($this->prefixId, |
| 663 | - array ( |
|
| 663 | + array( |
|
| 664 | 664 | 'id' => $results->current()['uid'], |
| 665 | 665 | 'highlight_word' => preg_replace('/\s\s+/', ';', $results->metadata['searchString']), |
| 666 | - 'page' => count($results[0]['subparts']) == 1?$results[0]['subparts'][0]['page']:1 |
|
| 666 | + 'page' => count($results[0]['subparts']) == 1 ? $results[0]['subparts'][0]['page'] : 1 |
|
| 667 | 667 | ), '', TRUE, FALSE); |
| 668 | 668 | |
| 669 | 669 | } else { |
@@ -674,7 +674,7 @@ discard block |
||
| 674 | 674 | if (!empty($this->piVars['order'])) { |
| 675 | 675 | |
| 676 | 676 | $linkConf['additionalParams'] = \TYPO3\CMS\Core\Utility\GeneralUtility::implodeArrayForUrl($this->prefixId, |
| 677 | - array ( |
|
| 677 | + array( |
|
| 678 | 678 | 'order' => $this->piVars['order'], |
| 679 | 679 | 'asc' => (!empty($this->piVars['asc']) ? '1' : '0') |
| 680 | 680 | ), '', TRUE, FALSE); |
@@ -709,12 +709,12 @@ discard block |
||
| 709 | 709 | |
| 710 | 710 | $this->init($conf); |
| 711 | 711 | |
| 712 | - $menuArray = array (); |
|
| 712 | + $menuArray = array(); |
|
| 713 | 713 | |
| 714 | 714 | // Set default value for facet search. |
| 715 | - $search = array ( |
|
| 715 | + $search = array( |
|
| 716 | 716 | 'query' => '*', |
| 717 | - 'params' => array () |
|
| 717 | + 'params' => array() |
|
| 718 | 718 | ); |
| 719 | 719 | |
| 720 | 720 | // Extract query and filter from last search. |
@@ -743,14 +743,14 @@ discard block |
||
| 743 | 743 | |
| 744 | 744 | } |
| 745 | 745 | |
| 746 | - return array (); |
|
| 746 | + return array(); |
|
| 747 | 747 | |
| 748 | 748 | } |
| 749 | 749 | |
| 750 | 750 | // Set needed parameters for facet search. |
| 751 | 751 | if (empty($search['params']['fq'])) { |
| 752 | 752 | |
| 753 | - $search['params']['fq'] = array (); |
|
| 753 | + $search['params']['fq'] = array(); |
|
| 754 | 754 | |
| 755 | 755 | } |
| 756 | 756 | |
@@ -767,7 +767,7 @@ discard block |
||
| 767 | 767 | // Process results. |
| 768 | 768 | foreach ($results->facet_counts->facet_fields as $field => $values) { |
| 769 | 769 | |
| 770 | - $entryArray = array (); |
|
| 770 | + $entryArray = array(); |
|
| 771 | 771 | |
| 772 | 772 | $entryArray['title'] = htmlspecialchars($this->conf['facets'][$field]); |
| 773 | 773 | |
@@ -32,7 +32,7 @@ |
||
| 32 | 32 | * |
| 33 | 33 | * @return void |
| 34 | 34 | */ |
| 35 | - public function main($content = '', $conf = array ()) { |
|
| 35 | + public function main($content = '', $conf = array()) { |
|
| 36 | 36 | |
| 37 | 37 | if (\TYPO3\CMS\Core\Utility\GeneralUtility::_GP('encrypted') != '' && \TYPO3\CMS\Core\Utility\GeneralUtility::_GP('hashed') != '') { |
| 38 | 38 | |
@@ -216,7 +216,7 @@ discard block |
||
| 216 | 216 | |
| 217 | 217 | $mailForm .= '<option value="">'.$this->pi_getLL('chooseMail', '', TRUE).'</option>'; |
| 218 | 218 | |
| 219 | - while($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($resultMail)){ |
|
| 219 | + while ($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($resultMail)) { |
|
| 220 | 220 | |
| 221 | 221 | $mails[] = $row; |
| 222 | 222 | |
@@ -261,7 +261,7 @@ discard block |
||
| 261 | 261 | |
| 262 | 262 | $printForm .= '<option value="">'.$this->pi_getLL('choosePrinter', '', TRUE).'</option>'; |
| 263 | 263 | |
| 264 | - while($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($resultPrinter)){ |
|
| 264 | + while ($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($resultPrinter)) { |
|
| 265 | 265 | |
| 266 | 266 | $printers[] = $row; |
| 267 | 267 | |
@@ -298,7 +298,7 @@ discard block |
||
| 298 | 298 | |
| 299 | 299 | $label = $this->pi_getLL('goBasket', '', TRUE); |
| 300 | 300 | |
| 301 | - $basketConf = array ( |
|
| 301 | + $basketConf = array( |
|
| 302 | 302 | 'parameter' => $this->conf['targetBasket'], |
| 303 | 303 | 'title' => $label |
| 304 | 304 | ); |
@@ -439,7 +439,7 @@ discard block |
||
| 439 | 439 | } |
| 440 | 440 | |
| 441 | 441 | // get document instance to load further information |
| 442 | - $document = tx_dlf_document::getInstance($documentItem['id'],0); |
|
| 442 | + $document = tx_dlf_document::getInstance($documentItem['id'], 0); |
|
| 443 | 443 | |
| 444 | 444 | // set endpage for toc and subentry based on logid |
| 445 | 445 | if (($_piVars['addToBasket'] == 'subentry') OR ($_piVars['addToBasket'] == 'toc')) { |
@@ -639,7 +639,7 @@ discard block |
||
| 639 | 639 | public function getDocumentData($id, $data) { |
| 640 | 640 | |
| 641 | 641 | // get document instance to load further information |
| 642 | - $document = tx_dlf_document::getInstance($id,0); |
|
| 642 | + $document = tx_dlf_document::getInstance($id, 0); |
|
| 643 | 643 | |
| 644 | 644 | if ($document) { |
| 645 | 645 | |
@@ -43,21 +43,21 @@ discard block |
||
| 43 | 43 | * @var array |
| 44 | 44 | * @access protected |
| 45 | 45 | */ |
| 46 | - protected $formats = array ( |
|
| 47 | - 'oai_dc' => array ( |
|
| 46 | + protected $formats = array( |
|
| 47 | + 'oai_dc' => array( |
|
| 48 | 48 | 'schema' => 'http://www.openarchives.org/OAI/2.0/oai_dc.xsd', |
| 49 | 49 | 'namespace' => 'http://www.openarchives.org/OAI/2.0/oai_dc/', |
| 50 | - 'requiredFields' => array ('record_id'), |
|
| 50 | + 'requiredFields' => array('record_id'), |
|
| 51 | 51 | ), |
| 52 | - 'epicur' => array ( |
|
| 52 | + 'epicur' => array( |
|
| 53 | 53 | 'schema' => 'http://www.persistent-identifier.de/xepicur/version1.0/xepicur.xsd', |
| 54 | 54 | 'namespace' => 'urn:nbn:de:1111-2004033116', |
| 55 | - 'requiredFields' => array ('purl', 'urn'), |
|
| 55 | + 'requiredFields' => array('purl', 'urn'), |
|
| 56 | 56 | ), |
| 57 | - 'mets' => array ( |
|
| 57 | + 'mets' => array( |
|
| 58 | 58 | 'schema' => 'http://www.loc.gov/standards/mets/version17/mets.v1-7.xsd', |
| 59 | 59 | 'namespace' => 'http://www.loc.gov/METS/', |
| 60 | - 'requiredFields' => array ('location'), |
|
| 60 | + 'requiredFields' => array('location'), |
|
| 61 | 61 | ) |
| 62 | 62 | ); |
| 63 | 63 | |
@@ -119,7 +119,7 @@ discard block |
||
| 119 | 119 | */ |
| 120 | 120 | protected function getUrlParams() { |
| 121 | 121 | |
| 122 | - $allowedParams = array ( |
|
| 122 | + $allowedParams = array( |
|
| 123 | 123 | 'verb', |
| 124 | 124 | 'identifier', |
| 125 | 125 | 'metadataPrefix', |
@@ -130,7 +130,7 @@ discard block |
||
| 130 | 130 | ); |
| 131 | 131 | |
| 132 | 132 | // Clear plugin variables. |
| 133 | - $this->piVars = array (); |
|
| 133 | + $this->piVars = array(); |
|
| 134 | 134 | |
| 135 | 135 | // Set only allowed parameters. |
| 136 | 136 | foreach ($allowedParams as $param) { |
@@ -516,7 +516,7 @@ discard block |
||
| 516 | 516 | } |
| 517 | 517 | |
| 518 | 518 | // Add request. |
| 519 | - $linkConf = array ( |
|
| 519 | + $linkConf = array( |
|
| 520 | 520 | 'parameter' => $GLOBALS['TSFE']->id, |
| 521 | 521 | 'forceAbsoluteUrl' => 1 |
| 522 | 522 | ); |
@@ -600,7 +600,7 @@ discard block |
||
| 600 | 600 | |
| 601 | 601 | $complete = FALSE; |
| 602 | 602 | |
| 603 | - $todo = array (); |
|
| 603 | + $todo = array(); |
|
| 604 | 604 | |
| 605 | 605 | $resume = $this->oai->createElementNS('http://www.openarchives.org/OAI/2.0/', $this->piVars['verb']); |
| 606 | 606 | |
@@ -720,14 +720,14 @@ discard block |
||
| 720 | 720 | // Save result set to database and generate resumption token. |
| 721 | 721 | $token = uniqid(); |
| 722 | 722 | |
| 723 | - $resultSet->metadata = array ( |
|
| 723 | + $resultSet->metadata = array( |
|
| 724 | 724 | 'offset' => intval($resultSet->metadata['offset'] + $this->conf['limit']), |
| 725 | 725 | 'metadataPrefix' => $resultSet->metadata['metadataPrefix'], |
| 726 | 726 | ); |
| 727 | 727 | |
| 728 | 728 | $result = $GLOBALS['TYPO3_DB']->exec_INSERTquery( |
| 729 | 729 | 'tx_dlf_tokens', |
| 730 | - array ( |
|
| 730 | + array( |
|
| 731 | 731 | 'tstamp' => $GLOBALS['EXEC_TIME'], |
| 732 | 732 | 'token' => $token, |
| 733 | 733 | 'options' => serialize($resultSet), |
@@ -955,7 +955,7 @@ discard block |
||
| 955 | 955 | $result = $GLOBALS['TYPO3_DB']->exec_SELECTquery( |
| 956 | 956 | 'tx_dlf_documents.tstamp AS tstamp', |
| 957 | 957 | 'tx_dlf_documents', |
| 958 | - 'tx_dlf_documents.pid=' . intval($this->conf['pages']), |
|
| 958 | + 'tx_dlf_documents.pid='.intval($this->conf['pages']), |
|
| 959 | 959 | '', |
| 960 | 960 | 'tx_dlf_documents.tstamp ASC', |
| 961 | 961 | '1' |
@@ -970,14 +970,14 @@ discard block |
||
| 970 | 970 | |
| 971 | 971 | if (TYPO3_DLOG) { |
| 972 | 972 | |
| 973 | - \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('[tx_dlf_oai->verbIdentify()] No records found with PID "' . |
|
| 974 | - $this->conf['pages'] . '"', $this->extKey, SYSLOG_SEVERITY_NOTICE); |
|
| 973 | + \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('[tx_dlf_oai->verbIdentify()] No records found with PID "'. |
|
| 974 | + $this->conf['pages'].'"', $this->extKey, SYSLOG_SEVERITY_NOTICE); |
|
| 975 | 975 | |
| 976 | 976 | } |
| 977 | 977 | |
| 978 | 978 | } |
| 979 | 979 | |
| 980 | - $linkConf = array ( |
|
| 980 | + $linkConf = array( |
|
| 981 | 981 | 'parameter' => $GLOBALS['TSFE']->id, |
| 982 | 982 | 'forceAbsoluteUrl' => 1 |
| 983 | 983 | ); |
@@ -1164,7 +1164,7 @@ discard block |
||
| 1164 | 1164 | } else { |
| 1165 | 1165 | |
| 1166 | 1166 | // Build result set. |
| 1167 | - $results = array (); |
|
| 1167 | + $results = array(); |
|
| 1168 | 1168 | |
| 1169 | 1169 | while ($resArray = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($result)) { |
| 1170 | 1170 | |
@@ -1181,7 +1181,7 @@ discard block |
||
| 1181 | 1181 | |
| 1182 | 1182 | $complete = FALSE; |
| 1183 | 1183 | |
| 1184 | - $todo = array (); |
|
| 1184 | + $todo = array(); |
|
| 1185 | 1185 | |
| 1186 | 1186 | $ListIdentifiers = $this->oai->createElementNS('http://www.openarchives.org/OAI/2.0/', 'ListIdentifiers'); |
| 1187 | 1187 | |
@@ -1252,14 +1252,14 @@ discard block |
||
| 1252 | 1252 | // Save result set to database and generate resumption token. |
| 1253 | 1253 | $token = uniqid(); |
| 1254 | 1254 | |
| 1255 | - $resultSet->metadata = array ( |
|
| 1255 | + $resultSet->metadata = array( |
|
| 1256 | 1256 | 'offset' => intval($this->conf['limit']), |
| 1257 | 1257 | 'metadataPrefix' => $this->piVars['metadataPrefix'], |
| 1258 | 1258 | ); |
| 1259 | 1259 | |
| 1260 | 1260 | $result = $GLOBALS['TYPO3_DB']->exec_INSERTquery( |
| 1261 | 1261 | 'tx_dlf_tokens', |
| 1262 | - array ( |
|
| 1262 | + array( |
|
| 1263 | 1263 | 'tstamp' => $GLOBALS['EXEC_TIME'], |
| 1264 | 1264 | 'token' => $token, |
| 1265 | 1265 | 'options' => serialize($resultSet), |
@@ -1306,7 +1306,7 @@ discard block |
||
| 1306 | 1306 | */ |
| 1307 | 1307 | protected function verbListMetadataFormats() { |
| 1308 | 1308 | |
| 1309 | - $resArray = array (); |
|
| 1309 | + $resArray = array(); |
|
| 1310 | 1310 | |
| 1311 | 1311 | // Check for invalid arguments. |
| 1312 | 1312 | if (count($this->piVars) > 1) { |
@@ -1540,7 +1540,7 @@ discard block |
||
| 1540 | 1540 | } else { |
| 1541 | 1541 | |
| 1542 | 1542 | // Build result set. |
| 1543 | - $results = array (); |
|
| 1543 | + $results = array(); |
|
| 1544 | 1544 | |
| 1545 | 1545 | while ($resArray = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($result)) { |
| 1546 | 1546 | |
@@ -1551,7 +1551,7 @@ discard block |
||
| 1551 | 1551 | |
| 1552 | 1552 | $complete = FALSE; |
| 1553 | 1553 | |
| 1554 | - $todo = array (); |
|
| 1554 | + $todo = array(); |
|
| 1555 | 1555 | |
| 1556 | 1556 | $ListRecords = $this->oai->createElementNS('http://www.openarchives.org/OAI/2.0/', 'ListRecords'); |
| 1557 | 1557 | |
@@ -1657,14 +1657,14 @@ discard block |
||
| 1657 | 1657 | // Save result set to database and generate resumption token. |
| 1658 | 1658 | $token = uniqid(); |
| 1659 | 1659 | |
| 1660 | - $resultSet->metadata = array ( |
|
| 1660 | + $resultSet->metadata = array( |
|
| 1661 | 1661 | 'offset' => intval($this->conf['limit']), |
| 1662 | 1662 | 'metadataPrefix' => $this->piVars['metadataPrefix'], |
| 1663 | 1663 | ); |
| 1664 | 1664 | |
| 1665 | 1665 | $result = $GLOBALS['TYPO3_DB']->exec_INSERTquery( |
| 1666 | 1666 | 'tx_dlf_tokens', |
| 1667 | - array ( |
|
| 1667 | + array( |
|
| 1668 | 1668 | 'tstamp' => $GLOBALS['EXEC_TIME'], |
| 1669 | 1669 | 'token' => $token, |
| 1670 | 1670 | 'options' => serialize($resultSet), |
@@ -27,7 +27,7 @@ discard block |
||
| 27 | 27 | * @var array |
| 28 | 28 | * @access protected |
| 29 | 29 | */ |
| 30 | - protected $audio = array (); |
|
| 30 | + protected $audio = array(); |
|
| 31 | 31 | |
| 32 | 32 | /** |
| 33 | 33 | * Adds Player javascript |
@@ -38,7 +38,7 @@ discard block |
||
| 38 | 38 | */ |
| 39 | 39 | protected function addPlayerJS() { |
| 40 | 40 | |
| 41 | - $output = array (); |
|
| 41 | + $output = array(); |
|
| 42 | 42 | |
| 43 | 43 | $output[] = '<link type="text/css" rel="stylesheet" href="'.\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::siteRelPath($this->extKey).'lib/jPlayer/blue.monday/css/jplayer.blue.monday.min.css">'; |
| 44 | 44 | |
@@ -55,9 +55,9 @@ discard block |
||
| 55 | 55 | $(document).ready(function() { |
| 56 | 56 | tx_dlf_audioplayer = new dlfAudioPlayer({ |
| 57 | 57 | audio: { |
| 58 | - mimeType: "' . $this->audio['mimetype'] . '", |
|
| 59 | - title: "' . $this->audio['label'] . '", |
|
| 60 | - url: "' . $this->audio['url'] . '" |
|
| 58 | + mimeType: "' . $this->audio['mimetype'].'", |
|
| 59 | + title: "' . $this->audio['label'].'", |
|
| 60 | + url: "' . $this->audio['url'].'" |
|
| 61 | 61 | }, |
| 62 | 62 | parentElId: "tx-dlf-audio", |
| 63 | 63 | swfPath: "'.\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::siteRelPath($this->extKey).'lib/jPlayer/jquery.jplayer.swf" |
@@ -138,7 +138,7 @@ discard block |
||
| 138 | 138 | } |
| 139 | 139 | |
| 140 | 140 | // Fill in the template markers. |
| 141 | - $markerArray = array ( |
|
| 141 | + $markerArray = array( |
|
| 142 | 142 | '###PLAYER_JS###' => $this->addPlayerJS() |
| 143 | 143 | ); |
| 144 | 144 | |
@@ -164,10 +164,10 @@ |
||
| 164 | 164 | $item->appendChild($rss->createElement('title', htmlspecialchars($title, ENT_NOQUOTES, 'UTF-8'))); |
| 165 | 165 | |
| 166 | 166 | // Add link. |
| 167 | - $linkConf = array ( |
|
| 167 | + $linkConf = array( |
|
| 168 | 168 | 'parameter' => $this->conf['targetPid'], |
| 169 | 169 | 'forceAbsoluteUrl' => 1, |
| 170 | - 'additionalParams' => \TYPO3\CMS\Core\Utility\GeneralUtility::implodeArrayForUrl($this->prefixId, array ('id' => $resArray['uid']), '', TRUE, FALSE) |
|
| 170 | + 'additionalParams' => \TYPO3\CMS\Core\Utility\GeneralUtility::implodeArrayForUrl($this->prefixId, array('id' => $resArray['uid']), '', TRUE, FALSE) |
|
| 171 | 171 | ); |
| 172 | 172 | |
| 173 | 173 | $item->appendChild($rss->createElement('link', htmlspecialchars($this->cObj->typoLink_URL($linkConf), ENT_NOQUOTES, 'UTF-8'))); |