[TASK] Superfluous comparison in indexed_search 40/25740/2
authorWouter Wolters <typo3@wouterwolters.nl>
Thu, 28 Nov 2013 20:57:33 +0000 (21:57 +0100)
committerWouter Wolters <typo3@wouterwolters.nl>
Tue, 7 Jan 2014 23:09:59 +0000 (00:09 +0100)
Change-Id: I1934a6201876290b706078519e934e05c28352ab
Resolves: #54053
Releases: 6.2
Reviewed-on: https://review.typo3.org/25740
Reviewed-by: Markus Klein
Tested-by: Markus Klein
Reviewed-by: Jo Hasenau
Reviewed-by: Michiel Roos
Tested-by: Michiel Roos
Reviewed-by: Wouter Wolters
Tested-by: Wouter Wolters
typo3/sysext/indexed_search/Classes/Controller/SearchFormController.php
typo3/sysext/indexed_search/Classes/Domain/Repository/IndexSearchRepository.php

index 6fc1383..7697fe8 100644 (file)
@@ -214,7 +214,7 @@ class SearchFormController extends \TYPO3\CMS\Frontend\Plugin\AbstractPlugin {
                // Indexer configuration from Extension Manager interface:
                $this->indexerConfig = unserialize($GLOBALS['TYPO3_CONF_VARS']['EXT']['extConf']['indexed_search']);
                $this->enableMetaphoneSearch = $this->indexerConfig['enableMetaphoneSearch'] ? TRUE : FALSE;
-               $this->storeMetaphoneInfoAsWords = \TYPO3\CMS\IndexedSearch\Utility\IndexedSearchUtility::isTableUsed('index_words') ? FALSE : TRUE;
+               $this->storeMetaphoneInfoAsWords = !\TYPO3\CMS\IndexedSearch\Utility\IndexedSearchUtility::isTableUsed('index_words');
                // Initialize external document parsers for icon display and other soft operations
                if (is_array($TYPO3_CONF_VARS['EXTCONF']['indexed_search']['external_parsers'])) {
                        foreach ($TYPO3_CONF_VARS['EXTCONF']['indexed_search']['external_parsers'] as $extension => $_objRef) {
index 0db8ec0..b731ff4 100644 (file)
@@ -298,7 +298,7 @@ class IndexSearchRepository {
                                        */
                                        $indexerObj = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\IndexedSearch\\Indexer');
                                        // Perform metaphone search
-                                       $storeMetaphoneInfoAsWords = $this->isTableUsed('index_words') ? FALSE : TRUE;
+                                       $storeMetaphoneInfoAsWords = !$this->isTableUsed('index_words');
                                        $res = $this->searchMetaphone($indexerObj->metaphone($sWord, $storeMetaphoneInfoAsWords));
                                        unset($indexerObj);
                                        break;