We could not synchronize checks via GitHub's checks API since Scrutinizer's GitHub App is not installed for this repository.
@@ -36,7 +36,7 @@ discard block |
||
| 36 | 36 | $result = $GLOBALS['TYPO3_DB']->exec_SELECTquery( |
| 37 | 37 | 'tx_dlf_metadata.*', |
| 38 | 38 | 'tx_dlf_metadata', |
| 39 | - 'tx_dlf_metadata.index_autocomplete=1 AND tx_dlf_metadata.pid='.intval($this->conf['pages']).tx_dlf_helper::whereClause('tx_dlf_metadata'), |
|
| 39 | + 'tx_dlf_metadata.index_autocomplete=1 AND tx_dlf_metadata.pid=' . intval($this->conf['pages']) . tx_dlf_helper::whereClause('tx_dlf_metadata'), |
|
| 40 | 40 | '', |
| 41 | 41 | '', |
| 42 | 42 | '1' |
@@ -44,7 +44,7 @@ discard block |
||
| 44 | 44 | |
| 45 | 45 | if ($GLOBALS['TYPO3_DB']->sql_num_rows($result)) { |
| 46 | 46 | |
| 47 | - $GLOBALS['TSFE']->additionalHeaderData[$this->prefixId.'_search_suggest'] = '<script type="text/javascript" src="'.\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::siteRelPath($this->extKey).'plugins/search/tx_dlf_search_suggest.js"></script>'; |
|
| 47 | + $GLOBALS['TSFE']->additionalHeaderData[$this->prefixId . '_search_suggest'] = '<script type="text/javascript" src="' . \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::siteRelPath($this->extKey) . 'plugins/search/tx_dlf_search_suggest.js"></script>'; |
|
| 48 | 48 | |
| 49 | 49 | } else { |
| 50 | 50 | |
@@ -73,7 +73,7 @@ discard block |
||
| 73 | 73 | if (!empty($list->metadata['options']['source']) && $list->metadata['options']['source'] == 'collection') { |
| 74 | 74 | |
| 75 | 75 | // Get collection's UID. |
| 76 | - return '<input type="hidden" name="'.$this->prefixId.'[collection]" value="'.$list->metadata['options']['select'].'" />'; |
|
| 76 | + return '<input type="hidden" name="' . $this->prefixId . '[collection]" value="' . $list->metadata['options']['select'] . '" />'; |
|
| 77 | 77 | |
| 78 | 78 | } elseif (!empty($list->metadata['options']['params']['filterquery'])) { |
| 79 | 79 | |
@@ -90,7 +90,7 @@ discard block |
||
| 90 | 90 | |
| 91 | 91 | } |
| 92 | 92 | |
| 93 | - return '<input type="hidden" name="'.$this->prefixId.'[collection]" value="'.$collectionId.'" />'; |
|
| 93 | + return '<input type="hidden" name="' . $this->prefixId . '[collection]" value="' . $collectionId . '" />'; |
|
| 94 | 94 | |
| 95 | 95 | } |
| 96 | 96 | |
@@ -118,7 +118,7 @@ discard block |
||
| 118 | 118 | // Get document's UID or parent ID. |
| 119 | 119 | if ($this->doc->ready) { |
| 120 | 120 | |
| 121 | - return '<input type="hidden" name="'.$this->prefixId.'[id]" value="'.($this->doc->parentId > 0 ? $this->doc->parentId : $this->doc->uid).'" />'; |
|
| 121 | + return '<input type="hidden" name="' . $this->prefixId . '[id]" value="' . ($this->doc->parentId > 0 ? $this->doc->parentId : $this->doc->uid) . '" />'; |
|
| 122 | 122 | |
| 123 | 123 | } |
| 124 | 124 | |
@@ -137,7 +137,7 @@ discard block |
||
| 137 | 137 | |
| 138 | 138 | } |
| 139 | 139 | |
| 140 | - return '<input type="hidden" name="'.$this->prefixId.'[id]" value="'.$documentId.'" />'; |
|
| 140 | + return '<input type="hidden" name="' . $this->prefixId . '[id]" value="' . $documentId . '" />'; |
|
| 141 | 141 | |
| 142 | 142 | } |
| 143 | 143 | |
@@ -167,7 +167,7 @@ discard block |
||
| 167 | 167 | // Add encrypted fields to search form. |
| 168 | 168 | if (is_array($name)) { |
| 169 | 169 | |
| 170 | - return '<input type="hidden" name="'.$this->prefixId.'[encrypted]" value="'.$name['encrypted'].'" /><input type="hidden" name="'.$this->prefixId.'[hashed]" value="'.$name['hash'].'" />'; |
|
| 170 | + return '<input type="hidden" name="' . $this->prefixId . '[encrypted]" value="' . $name['encrypted'] . '" /><input type="hidden" name="' . $this->prefixId . '[hashed]" value="' . $name['hash'] . '" />'; |
|
| 171 | 171 | |
| 172 | 172 | } else { |
| 173 | 173 | |
@@ -198,9 +198,9 @@ 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 | - $operatorOptions .= '<option class="tx-dlf-search-operator-option tx-dlf-search-operator-'.$operator.'" value="'.$operator.'">'.$this->pi_getLL($operator, '', TRUE).'</option>'; |
|
| 203 | + $operatorOptions .= '<option class="tx-dlf-search-operator-option tx-dlf-search-operator-' . $operator . '" value="' . $operator . '">' . $this->pi_getLL($operator, '', TRUE) . '</option>'; |
|
| 204 | 204 | |
| 205 | 205 | } |
| 206 | 206 | |
@@ -211,16 +211,16 @@ discard block |
||
| 211 | 211 | |
| 212 | 212 | foreach ($searchFields as $searchField) { |
| 213 | 213 | |
| 214 | - $fieldSelectorOptions .= '<option class="tx-dlf-search-field-option tx-dlf-search-field-'.$searchField.'" value="'.$searchField.'">'.tx_dlf_helper::translate($searchField, 'tx_dlf_metadata', $this->conf['pages']).'</option>'; |
|
| 214 | + $fieldSelectorOptions .= '<option class="tx-dlf-search-field-option tx-dlf-search-field-' . $searchField . '" value="' . $searchField . '">' . tx_dlf_helper::translate($searchField, 'tx_dlf_metadata', $this->conf['pages']) . '</option>'; |
|
| 215 | 215 | |
| 216 | 216 | } |
| 217 | 217 | |
| 218 | 218 | for ($i = 0; $i < $this->conf['extendedSlotCount']; $i++) { |
| 219 | 219 | |
| 220 | - $markerArray = array ( |
|
| 221 | - '###EXT_SEARCH_OPERATOR###' => '<select class="tx-dlf-search-operator tx-dlf-search-operator-'.$i.'" name="'.$this->prefixId.'[extOperator]['.$i.']">'.$operatorOptions.'</select>', |
|
| 222 | - '###EXT_SEARCH_FIELDSELECTOR###' => '<select class="tx-dlf-search-field tx-dlf-search-field-'.$i.'" name="'.$this->prefixId.'[extField]['.$i.']">'.$fieldSelectorOptions.'</select>', |
|
| 223 | - '###EXT_SEARCH_FIELDQUERY###' => '<input class="tx-dlf-search-query tx-dlf-search-query-'.$i.'" type="text" name="'.$this->prefixId.'[extQuery]['.$i.']" />' |
|
| 220 | + $markerArray = array( |
|
| 221 | + '###EXT_SEARCH_OPERATOR###' => '<select class="tx-dlf-search-operator tx-dlf-search-operator-' . $i . '" name="' . $this->prefixId . '[extOperator][' . $i . ']">' . $operatorOptions . '</select>', |
|
| 222 | + '###EXT_SEARCH_FIELDSELECTOR###' => '<select class="tx-dlf-search-field tx-dlf-search-field-' . $i . '" name="' . $this->prefixId . '[extField][' . $i . ']">' . $fieldSelectorOptions . '</select>', |
|
| 223 | + '###EXT_SEARCH_FIELDQUERY###' => '<input class="tx-dlf-search-query tx-dlf-search-query-' . $i . '" type="text" name="' . $this->prefixId . '[extQuery][' . $i . ']" />' |
|
| 224 | 224 | ); |
| 225 | 225 | |
| 226 | 226 | $extendedSearch .= $this->cObj->substituteMarkerArray($this->cObj->getSubpart($this->template, '###EXT_SEARCH_ENTRY###'), $markerArray); |
@@ -261,16 +261,16 @@ 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 | |
| 268 | - $facets[$facet.'_faceting'] = tx_dlf_helper::translate($facet, 'tx_dlf_metadata', $this->conf['pages']); |
|
| 268 | + $facets[$facet . '_faceting'] = tx_dlf_helper::translate($facet, 'tx_dlf_metadata', $this->conf['pages']); |
|
| 269 | 269 | |
| 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 | |
@@ -330,9 +330,9 @@ discard block |
||
| 330 | 330 | // Check for plugin configuration. |
| 331 | 331 | if (!empty($this->conf['showLogicalPageField'])) { |
| 332 | 332 | |
| 333 | - $output .= ' <label for="tx-dlf-search-logical-page">'.$this->pi_getLL('label.logicalPage', '').': </label>'; |
|
| 333 | + $output .= ' <label for="tx-dlf-search-logical-page">' . $this->pi_getLL('label.logicalPage', '') . ': </label>'; |
|
| 334 | 334 | |
| 335 | - $output .= ' <input class="tx-dlf-search-logical-page" id="tx-dlf-search-logical-page" type="text" name="'.$this->prefixId.'[logicalPage]" />'; |
|
| 335 | + $output .= ' <input class="tx-dlf-search-logical-page" id="tx-dlf-search-logical-page" type="text" name="' . $this->prefixId . '[logicalPage]" />'; |
|
| 336 | 336 | |
| 337 | 337 | } |
| 338 | 338 | |
@@ -353,7 +353,7 @@ discard block |
||
| 353 | 353 | */ |
| 354 | 354 | protected function getFacetsMenuEntry($field, $value, $count, $search, &$state) { |
| 355 | 355 | |
| 356 | - $entryArray = array (); |
|
| 356 | + $entryArray = array(); |
|
| 357 | 357 | |
| 358 | 358 | // Translate value. |
| 359 | 359 | if ($field == 'owner_faceting') { |
@@ -388,7 +388,7 @@ discard block |
||
| 388 | 388 | |
| 389 | 389 | // Check if facet is already selected. |
| 390 | 390 | $queryColumn = array_column($search['params']['filterquery'], 'query'); |
| 391 | - $index = array_search($field.':("'.tx_dlf_solr::escapeQuery($value).'")', $queryColumn); |
|
| 391 | + $index = array_search($field . ':("' . tx_dlf_solr::escapeQuery($value) . '")', $queryColumn); |
|
| 392 | 392 | |
| 393 | 393 | if ($index !== FALSE) { |
| 394 | 394 | |
@@ -406,20 +406,20 @@ discard block |
||
| 406 | 406 | //remove ($count) for selected facet in template |
| 407 | 407 | $entryArray['count'] = FALSE; |
| 408 | 408 | //build link to delete selected facet |
| 409 | - $entryArray['_OVERRIDE_HREF'] = $this->pi_linkTP_keepPIvars_url(array ('query' => $search['query'], 'fq' => $queryColumn)); |
|
| 409 | + $entryArray['_OVERRIDE_HREF'] = $this->pi_linkTP_keepPIvars_url(array('query' => $search['query'], 'fq' => $queryColumn)); |
|
| 410 | 410 | $entryArray['title'] = sprintf($this->pi_getLL('resetFacet', ''), $entryArray['title']); |
| 411 | 411 | } |
| 412 | 412 | |
| 413 | 413 | } else { |
| 414 | 414 | |
| 415 | 415 | // Facet is not selected, thus add it to filter. |
| 416 | - $queryColumn[] = $field.':("'.tx_dlf_solr::escapeQuery($value).'")'; |
|
| 416 | + $queryColumn[] = $field . ':("' . tx_dlf_solr::escapeQuery($value) . '")'; |
|
| 417 | 417 | |
| 418 | 418 | $entryArray['ITEM_STATE'] = 'NO'; |
| 419 | 419 | |
| 420 | 420 | } |
| 421 | 421 | |
| 422 | - $entryArray['_OVERRIDE_HREF'] = $this->pi_linkTP_keepPIvars_url(array ('query' => $search['query'], 'fq' => $queryColumn)); |
|
| 422 | + $entryArray['_OVERRIDE_HREF'] = $this->pi_linkTP_keepPIvars_url(array('query' => $search['query'], 'fq' => $queryColumn)); |
|
| 423 | 423 | |
| 424 | 424 | return $entryArray; |
| 425 | 425 | |
@@ -447,7 +447,7 @@ discard block |
||
| 447 | 447 | |
| 448 | 448 | if (TYPO3_DLOG) { |
| 449 | 449 | |
| 450 | - \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('[tx_dlf_search->main('.$content.', [data])] Incomplete plugin configuration', $this->extKey, SYSLOG_SEVERITY_WARNING, $conf); |
|
| 450 | + \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('[tx_dlf_search->main(' . $content . ', [data])] Incomplete plugin configuration', $this->extKey, SYSLOG_SEVERITY_WARNING, $conf); |
|
| 451 | 451 | |
| 452 | 452 | } |
| 453 | 453 | |
@@ -491,16 +491,16 @@ discard block |
||
| 491 | 491 | } |
| 492 | 492 | |
| 493 | 493 | // Configure @action URL for form. |
| 494 | - $linkConf = array ( |
|
| 494 | + $linkConf = array( |
|
| 495 | 495 | 'parameter' => $GLOBALS['TSFE']->id |
| 496 | 496 | ); |
| 497 | 497 | |
| 498 | 498 | // Fill markers. |
| 499 | - $markerArray = array ( |
|
| 499 | + $markerArray = array( |
|
| 500 | 500 | '###ACTION_URL###' => $this->cObj->typoLink_URL($linkConf), |
| 501 | 501 | '###LABEL_QUERY###' => (!empty($search['query']) ? htmlspecialchars($search['query']) : $this->pi_getLL('label.query')), |
| 502 | 502 | '###LABEL_SUBMIT###' => $this->pi_getLL('label.submit'), |
| 503 | - '###FIELD_QUERY###' => $this->prefixId.'[query]', |
|
| 503 | + '###FIELD_QUERY###' => $this->prefixId . '[query]', |
|
| 504 | 504 | '###QUERY###' => (!empty($search['query']) ? $search['query'] : ''), |
| 505 | 505 | '###FULLTEXTSWITCH###' => $this->addFulltextSwitch($list->metadata['fulltextSearch']), |
| 506 | 506 | '###FIELD_DOC###' => ($this->conf['searchIn'] == 'document' || $this->conf['searchIn'] == 'all' ? $this->addCurrentDocument() : ''), |
@@ -527,7 +527,7 @@ discard block |
||
| 527 | 527 | |
| 528 | 528 | if (TYPO3_DLOG) { |
| 529 | 529 | |
| 530 | - \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('[tx_dlf_search->main('.$content.', [data])] Apache Solr not available', $this->extKey, SYSLOG_SEVERITY_ERROR, $conf); |
|
| 530 | + \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('[tx_dlf_search->main(' . $content . ', [data])] Apache Solr not available', $this->extKey, SYSLOG_SEVERITY_ERROR, $conf); |
|
| 531 | 531 | |
| 532 | 532 | } |
| 533 | 533 | |
@@ -545,9 +545,9 @@ discard block |
||
| 545 | 545 | } |
| 546 | 546 | |
| 547 | 547 | // Prepare query parameters. |
| 548 | - $params = array (); |
|
| 548 | + $params = array(); |
|
| 549 | 549 | |
| 550 | - $matches = array (); |
|
| 550 | + $matches = array(); |
|
| 551 | 551 | |
| 552 | 552 | // Set search query. |
| 553 | 553 | if ((!empty($this->conf['fulltext']) && !empty($this->piVars['fulltext'])) || preg_match('/fulltext:\((.*)\)/', $this->piVars['query'], $matches)) { |
@@ -558,7 +558,7 @@ discard block |
||
| 558 | 558 | // Search in fulltext field if applicable. Query must not be empty! |
| 559 | 559 | if (!empty($this->piVars['query'])) { |
| 560 | 560 | |
| 561 | - $query = 'fulltext:('.tx_dlf_solr::escapeQuery($this->piVars['query']).')'; |
|
| 561 | + $query = 'fulltext:(' . tx_dlf_solr::escapeQuery($this->piVars['query']) . ')'; |
|
| 562 | 562 | |
| 563 | 563 | } |
| 564 | 564 | |
@@ -571,7 +571,7 @@ discard block |
||
| 571 | 571 | // Add extended search query. |
| 572 | 572 | if (!empty($this->piVars['extQuery']) && is_array($this->piVars['extQuery'])) { |
| 573 | 573 | |
| 574 | - $allowedOperators = array ('AND', 'OR', 'NOT'); |
|
| 574 | + $allowedOperators = array('AND', 'OR', 'NOT'); |
|
| 575 | 575 | |
| 576 | 576 | $allowedFields = \TYPO3\CMS\Core\Utility\GeneralUtility::trimExplode(',', $this->conf['extendedFields'], TRUE); |
| 577 | 577 | |
@@ -583,11 +583,11 @@ discard block |
||
| 583 | 583 | |
| 584 | 584 | if (!empty($query)) { |
| 585 | 585 | |
| 586 | - $query .= ' '.$this->piVars['extOperator'][$i].' '; |
|
| 586 | + $query .= ' ' . $this->piVars['extOperator'][$i] . ' '; |
|
| 587 | 587 | |
| 588 | 588 | } |
| 589 | 589 | |
| 590 | - $query .= tx_dlf_indexing::getIndexFieldName($this->piVars['extField'][$i], $this->conf['pages']).':('.tx_dlf_solr::escapeQuery($this->piVars['extQuery'][$i]).')'; |
|
| 590 | + $query .= tx_dlf_indexing::getIndexFieldName($this->piVars['extField'][$i], $this->conf['pages']) . ':(' . tx_dlf_solr::escapeQuery($this->piVars['extQuery'][$i]) . ')'; |
|
| 591 | 591 | |
| 592 | 592 | } |
| 593 | 593 | |
@@ -613,7 +613,7 @@ discard block |
||
| 613 | 613 | |
| 614 | 614 | if (!empty($this->piVars['id']) && \TYPO3\CMS\Core\Utility\MathUtility::canBeInterpretedAsInteger($this->piVars['id'])) { |
| 615 | 615 | |
| 616 | - $params['filterquery'][]['query'] = 'uid:('.$this->piVars['id'].') OR partof:('.$this->piVars['id'].')'; |
|
| 616 | + $params['filterquery'][]['query'] = 'uid:(' . $this->piVars['id'] . ') OR partof:(' . $this->piVars['id'] . ')'; |
|
| 617 | 617 | |
| 618 | 618 | $label .= htmlspecialchars(sprintf($this->pi_getLL('in', ''), tx_dlf_document::getTitle($this->piVars['id']))); |
| 619 | 619 | |
@@ -628,7 +628,7 @@ discard block |
||
| 628 | 628 | |
| 629 | 629 | $index_name = tx_dlf_helper::getIndexName($this->piVars['collection'], 'tx_dlf_collections', $this->conf['pages']); |
| 630 | 630 | |
| 631 | - $params['filterquery'][]['query'] = 'collection_faceting:("'.tx_dlf_solr::escapeQuery($index_name).'")'; |
|
| 631 | + $params['filterquery'][]['query'] = 'collection_faceting:("' . tx_dlf_solr::escapeQuery($index_name) . '")'; |
|
| 632 | 632 | |
| 633 | 633 | $label .= sprintf($this->pi_getLL('in', '', TRUE), tx_dlf_helper::translate($index_name, 'tx_dlf_collections', $this->conf['pages'])); |
| 634 | 634 | |
@@ -641,7 +641,7 @@ discard block |
||
| 641 | 641 | |
| 642 | 642 | $collIds = explode(',', $this->conf['collections']); |
| 643 | 643 | |
| 644 | - $collIndexNames = array (); |
|
| 644 | + $collIndexNames = array(); |
|
| 645 | 645 | |
| 646 | 646 | foreach ($collIds as $collId) { |
| 647 | 647 | |
@@ -650,7 +650,7 @@ discard block |
||
| 650 | 650 | } |
| 651 | 651 | |
| 652 | 652 | // Last value is fake and used for distinction in $this->addCurrentCollection() |
| 653 | - $params['filterquery'][]['query'] = 'collection_faceting:("'.implode('" OR "', $collIndexNames).'" OR "FakeValueForDistinction")'; |
|
| 653 | + $params['filterquery'][]['query'] = 'collection_faceting:("' . implode('" OR "', $collIndexNames) . '" OR "FakeValueForDistinction")'; |
|
| 654 | 654 | |
| 655 | 655 | } |
| 656 | 656 | |
@@ -658,7 +658,7 @@ discard block |
||
| 658 | 658 | $params['query'] = !empty($query) ? $query : '*'; |
| 659 | 659 | $params['start'] = 0; |
| 660 | 660 | $params['rows'] = 0; |
| 661 | - $params['sort'] = array ('score' => 'desc'); |
|
| 661 | + $params['sort'] = array('score' => 'desc'); |
|
| 662 | 662 | |
| 663 | 663 | // Instantiate search object. |
| 664 | 664 | $solr = tx_dlf_solr::getInstance($this->conf['solrcore']); |
@@ -667,7 +667,7 @@ discard block |
||
| 667 | 667 | |
| 668 | 668 | if (TYPO3_DLOG) { |
| 669 | 669 | |
| 670 | - \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('[tx_dlf_search->main('.$content.', [data])] Apache Solr not available', $this->extKey, SYSLOG_SEVERITY_ERROR, $conf); |
|
| 670 | + \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('[tx_dlf_search->main(' . $content . ', [data])] Apache Solr not available', $this->extKey, SYSLOG_SEVERITY_ERROR, $conf); |
|
| 671 | 671 | |
| 672 | 672 | } |
| 673 | 673 | |
@@ -682,7 +682,7 @@ discard block |
||
| 682 | 682 | // Perform search. |
| 683 | 683 | $list = $solr->search(); |
| 684 | 684 | |
| 685 | - $list->metadata = array ( |
|
| 685 | + $list->metadata = array( |
|
| 686 | 686 | 'label' => $label, |
| 687 | 687 | 'thumbnail' => '', |
| 688 | 688 | 'searchString' => $this->piVars['query'], |
@@ -695,7 +695,7 @@ discard block |
||
| 695 | 695 | // Clean output buffer. |
| 696 | 696 | \TYPO3\CMS\Core\Utility\GeneralUtility::cleanOutputBuffers(); |
| 697 | 697 | |
| 698 | - $additionalParams = array (); |
|
| 698 | + $additionalParams = array(); |
|
| 699 | 699 | |
| 700 | 700 | if (!empty($this->piVars['logicalPage'])) { |
| 701 | 701 | |
@@ -729,7 +729,7 @@ discard block |
||
| 729 | 729 | $linkConf['additionalParams'] = \TYPO3\CMS\Core\Utility\GeneralUtility::implodeArrayForUrl($this->prefixId, $additionalParams, '', TRUE, FALSE); |
| 730 | 730 | |
| 731 | 731 | // Send headers. |
| 732 | - header('Location: '.\TYPO3\CMS\Core\Utility\GeneralUtility::locationHeaderUrl($this->cObj->typoLink_URL($linkConf))); |
|
| 732 | + header('Location: ' . \TYPO3\CMS\Core\Utility\GeneralUtility::locationHeaderUrl($this->cObj->typoLink_URL($linkConf))); |
|
| 733 | 733 | |
| 734 | 734 | // Flush output buffer and end script processing. |
| 735 | 735 | ob_end_flush(); |
@@ -754,15 +754,15 @@ discard block |
||
| 754 | 754 | |
| 755 | 755 | $this->init($conf); |
| 756 | 756 | |
| 757 | - $menuArray = array (); |
|
| 757 | + $menuArray = array(); |
|
| 758 | 758 | |
| 759 | 759 | // Set default value for facet search. |
| 760 | - $search = array ( |
|
| 760 | + $search = array( |
|
| 761 | 761 | 'query' => '*', |
| 762 | - 'params' => array ( |
|
| 763 | - 'component' => array ( |
|
| 764 | - 'facetset' => array ( |
|
| 765 | - 'facet' => array () |
|
| 762 | + 'params' => array( |
|
| 763 | + 'component' => array( |
|
| 764 | + 'facetset' => array( |
|
| 765 | + 'facet' => array() |
|
| 766 | 766 | ) |
| 767 | 767 | ) |
| 768 | 768 | ) |
@@ -790,24 +790,24 @@ discard block |
||
| 790 | 790 | |
| 791 | 791 | if (TYPO3_DLOG) { |
| 792 | 792 | |
| 793 | - \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('[tx_dlf_search->makeFacetsMenuArray('.$content.', [data])] Apache Solr not available', $this->extKey, SYSLOG_SEVERITY_ERROR, $conf); |
|
| 793 | + \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('[tx_dlf_search->makeFacetsMenuArray(' . $content . ', [data])] Apache Solr not available', $this->extKey, SYSLOG_SEVERITY_ERROR, $conf); |
|
| 794 | 794 | |
| 795 | 795 | } |
| 796 | 796 | |
| 797 | - return array (); |
|
| 797 | + return array(); |
|
| 798 | 798 | |
| 799 | 799 | } |
| 800 | 800 | |
| 801 | 801 | // Set needed parameters for facet search. |
| 802 | 802 | if (empty($search['params']['filterquery'])) { |
| 803 | 803 | |
| 804 | - $search['params']['filterquery'] = array (); |
|
| 804 | + $search['params']['filterquery'] = array(); |
|
| 805 | 805 | |
| 806 | 806 | } |
| 807 | 807 | |
| 808 | 808 | foreach ($this->conf['facets'] as $field => $name) { |
| 809 | 809 | |
| 810 | - $search['params']['component']['facetset']['facet'][] = array ( |
|
| 810 | + $search['params']['component']['facetset']['facet'][] = array( |
|
| 811 | 811 | 'type' => 'field', |
| 812 | 812 | 'key' => $field, |
| 813 | 813 | 'field' => $field, |
@@ -832,7 +832,7 @@ discard block |
||
| 832 | 832 | // Process results. |
| 833 | 833 | foreach ($facet as $field => $values) { |
| 834 | 834 | |
| 835 | - $entryArray = array (); |
|
| 835 | + $entryArray = array(); |
|
| 836 | 836 | |
| 837 | 837 | $entryArray['title'] = htmlspecialchars($this->conf['facets'][$field]); |
| 838 | 838 | |
@@ -200,14 +200,14 @@ discard block |
||
| 200 | 200 | |
| 201 | 201 | foreach (array ('AND', 'OR', 'NOT') as $operator) { |
| 202 | 202 | |
| 203 | - $operatorOptions .= '<option class="tx-dlf-search-operator-option tx-dlf-search-operator-'.$operator.'" value="'.$operator.'">'.$this->pi_getLL($operator, '', TRUE).'</option>'; |
|
| 203 | + $operatorOptions .= '<option class="tx-dlf-search-operator-option tx-dlf-search-operator-'.$operator.'" value="'.$operator.'">'.$this->pi_getLL($operator, '', true).'</option>'; |
|
| 204 | 204 | |
| 205 | 205 | } |
| 206 | 206 | |
| 207 | 207 | // Get field selector options. |
| 208 | 208 | $fieldSelectorOptions = ''; |
| 209 | 209 | |
| 210 | - $searchFields = \TYPO3\CMS\Core\Utility\GeneralUtility::trimExplode(',', $this->conf['extendedFields'], TRUE); |
|
| 210 | + $searchFields = \TYPO3\CMS\Core\Utility\GeneralUtility::trimExplode(',', $this->conf['extendedFields'], true); |
|
| 211 | 211 | |
| 212 | 212 | foreach ($searchFields as $searchField) { |
| 213 | 213 | |
@@ -263,7 +263,7 @@ discard block |
||
| 263 | 263 | // Get facets from plugin configuration. |
| 264 | 264 | $facets = array (); |
| 265 | 265 | |
| 266 | - foreach (\TYPO3\CMS\Core\Utility\GeneralUtility::trimExplode(',', $this->conf['facets'], TRUE) as $facet) { |
|
| 266 | + foreach (\TYPO3\CMS\Core\Utility\GeneralUtility::trimExplode(',', $this->conf['facets'], true) as $facet) { |
|
| 267 | 267 | |
| 268 | 268 | $facets[$facet.'_faceting'] = tx_dlf_helper::translate($facet, 'tx_dlf_metadata', $this->conf['pages']); |
| 269 | 269 | |
@@ -390,7 +390,7 @@ discard block |
||
| 390 | 390 | $queryColumn = array_column($search['params']['filterquery'], 'query'); |
| 391 | 391 | $index = array_search($field.':("'.tx_dlf_solr::escapeQuery($value).'")', $queryColumn); |
| 392 | 392 | |
| 393 | - if ($index !== FALSE) { |
|
| 393 | + if ($index !== false) { |
|
| 394 | 394 | |
| 395 | 395 | // Facet is selected, thus remove it from filter. |
| 396 | 396 | unset($queryColumn[$index]); |
@@ -404,7 +404,7 @@ discard block |
||
| 404 | 404 | //Reset facets |
| 405 | 405 | if ($this->conf['resetFacets']) { |
| 406 | 406 | //remove ($count) for selected facet in template |
| 407 | - $entryArray['count'] = FALSE; |
|
| 407 | + $entryArray['count'] = false; |
|
| 408 | 408 | //build link to delete selected facet |
| 409 | 409 | $entryArray['_OVERRIDE_HREF'] = $this->pi_linkTP_keepPIvars_url(array ('query' => $search['query'], 'fq' => $queryColumn)); |
| 410 | 410 | $entryArray['title'] = sprintf($this->pi_getLL('resetFacet', ''), $entryArray['title']); |
@@ -440,7 +440,7 @@ discard block |
||
| 440 | 440 | $this->init($conf); |
| 441 | 441 | |
| 442 | 442 | // Disable caching for this plugin. |
| 443 | - $this->setCache(FALSE); |
|
| 443 | + $this->setCache(false); |
|
| 444 | 444 | |
| 445 | 445 | // Quit without doing anything if required variables are not set. |
| 446 | 446 | if (empty($this->conf['solrcore'])) { |
@@ -536,7 +536,7 @@ discard block |
||
| 536 | 536 | } |
| 537 | 537 | |
| 538 | 538 | // Build label for result list. |
| 539 | - $label = $this->pi_getLL('search', '', TRUE); |
|
| 539 | + $label = $this->pi_getLL('search', '', true); |
|
| 540 | 540 | |
| 541 | 541 | if (!empty($this->piVars['query'])) { |
| 542 | 542 | |
@@ -573,7 +573,7 @@ discard block |
||
| 573 | 573 | |
| 574 | 574 | $allowedOperators = array ('AND', 'OR', 'NOT'); |
| 575 | 575 | |
| 576 | - $allowedFields = \TYPO3\CMS\Core\Utility\GeneralUtility::trimExplode(',', $this->conf['extendedFields'], TRUE); |
|
| 576 | + $allowedFields = \TYPO3\CMS\Core\Utility\GeneralUtility::trimExplode(',', $this->conf['extendedFields'], true); |
|
| 577 | 577 | |
| 578 | 578 | for ($i = 0; $i < count($this->piVars['extQuery']); $i++) { |
| 579 | 579 | |
@@ -630,7 +630,7 @@ discard block |
||
| 630 | 630 | |
| 631 | 631 | $params['filterquery'][]['query'] = 'collection_faceting:("'.tx_dlf_solr::escapeQuery($index_name).'")'; |
| 632 | 632 | |
| 633 | - $label .= sprintf($this->pi_getLL('in', '', TRUE), tx_dlf_helper::translate($index_name, 'tx_dlf_collections', $this->conf['pages'])); |
|
| 633 | + $label .= sprintf($this->pi_getLL('in', '', true), tx_dlf_helper::translate($index_name, 'tx_dlf_collections', $this->conf['pages'])); |
|
| 634 | 634 | |
| 635 | 635 | } |
| 636 | 636 | |
@@ -726,7 +726,7 @@ discard block |
||
| 726 | 726 | |
| 727 | 727 | } |
| 728 | 728 | |
| 729 | - $linkConf['additionalParams'] = \TYPO3\CMS\Core\Utility\GeneralUtility::implodeArrayForUrl($this->prefixId, $additionalParams, '', TRUE, FALSE); |
|
| 729 | + $linkConf['additionalParams'] = \TYPO3\CMS\Core\Utility\GeneralUtility::implodeArrayForUrl($this->prefixId, $additionalParams, '', true, false); |
|
| 730 | 730 | |
| 731 | 731 | // Send headers. |
| 732 | 732 | header('Location: '.\TYPO3\CMS\Core\Utility\GeneralUtility::locationHeaderUrl($this->cObj->typoLink_URL($linkConf))); |
@@ -74,7 +74,7 @@ discard block |
||
| 74 | 74 | * @var boolean |
| 75 | 75 | * @access protected |
| 76 | 76 | */ |
| 77 | - protected $ready = FALSE; |
|
| 77 | + protected $ready = false; |
|
| 78 | 78 | |
| 79 | 79 | /** |
| 80 | 80 | * This holds the singleton search objects with their core as array key |
@@ -329,7 +329,7 @@ discard block |
||
| 329 | 329 | $start = max(intval($start), 0); |
| 330 | 330 | |
| 331 | 331 | // Check if core already exists. |
| 332 | - if (self::getInstance('dlfCore'.$start) === NULL) { |
|
| 332 | + if (self::getInstance('dlfCore'.$start) === null) { |
|
| 333 | 333 | |
| 334 | 334 | return $start; |
| 335 | 335 | |
@@ -430,7 +430,7 @@ discard block |
||
| 430 | 430 | 'core' => $this->core, |
| 431 | 431 | 'pid' => $this->cPid, |
| 432 | 432 | 'order' => 'score', |
| 433 | - 'order.asc' => TRUE, |
|
| 433 | + 'order.asc' => true, |
|
| 434 | 434 | 'numberOfHits' => $this->numberOfHits, |
| 435 | 435 | 'numberOfToplevelHits' => $numberOfToplevelHits |
| 436 | 436 | ) |
@@ -465,7 +465,7 @@ discard block |
||
| 465 | 465 | |
| 466 | 466 | $resultSet = []; |
| 467 | 467 | |
| 468 | - if (($entry = $cache->get($cacheIdentifier)) === FALSE) { |
|
| 468 | + if (($entry = $cache->get($cacheIdentifier)) === false) { |
|
| 469 | 469 | |
| 470 | 470 | $selectQuery = $this->service->createSelect(array_merge($this->params, $parameters)); |
| 471 | 471 | $result = $this->service->select($selectQuery); |
@@ -690,7 +690,7 @@ discard block |
||
| 690 | 690 | $this->core = $core; |
| 691 | 691 | |
| 692 | 692 | // Instantiation successful! |
| 693 | - $this->ready = TRUE; |
|
| 693 | + $this->ready = true; |
|
| 694 | 694 | |
| 695 | 695 | } catch (Exception $e) { |
| 696 | 696 | |