Commit dd50ddde authored by Tymoteusz Motylewski's avatar Tymoteusz Motylewski Committed by Christian Kuhn
Browse files

[BUGFIX] Incorrect search-results when searching for part of word

Added missing 'self::' before constants. Now search will also find
matches for parts of words.

Credit goes to Mats Svensson and Andreas Kiessling for spotting
the issue and providing patch.

Change-Id: Iddb3a6e10406895a69010b67ddb8b07066229a62
Fixes: #38548
Releases: 4.7, 6.0
Reviewed-on: http://review.typo3.org/13215
Reviewed-by: Oliver Salzburg
Tested-by: Oliver Salzburg
Reviewed-by: Oliver Klee
Reviewed-by: Wouter Wolters
Reviewed-by: Georg Ringer
Tested-by: Georg Ringer
Reviewed-by: Christian Kuhn
Tested-by: Christian Kuhn
parent 6edaca24
......@@ -420,8 +420,8 @@ class Tx_IndexedSearch_Domain_Repository_IndexSearchRepository {
* @return pointer SQL result pointer
*/
protected function searchWord($sWord, $mode) {
$wildcard_left = ($mode & WILDCARD_LEFT) ? '%' : '';
$wildcard_right = ($mode & WILDCARD_RIGHT) ? '%' : '';
$wildcard_left = ($mode & self::WILDCARD_LEFT) ? '%' : '';
$wildcard_right = ($mode & self::WILDCARD_RIGHT) ? '%' : '';
$wSel = 'IW.baseword LIKE \'' . $wildcard_left . $GLOBALS['TYPO3_DB']->quoteStr($sWord, 'index_words') . $wildcard_right . '\'';
$res = $this->execPHashListQuery($wSel, ' AND is_stopword=0');
......
......@@ -914,8 +914,8 @@ class tx_indexedsearch extends tslib_pibase {
* @return pointer SQL result pointer
*/
function searchWord($sWord, $mode) {
$wildcard_left = ($mode & WILDCARD_LEFT) ? '%' : '';
$wildcard_right = ($mode & WILDCARD_RIGHT) ? '%' : '';
$wildcard_left = ($mode & self::WILDCARD_LEFT) ? '%' : '';
$wildcard_right = ($mode & self::WILDCARD_RIGHT) ? '%' : '';
$wSel = 'IW.baseword LIKE \'' . $wildcard_left.$GLOBALS['TYPO3_DB']->quoteStr($sWord, 'index_words') . $wildcard_right . '\'';
$res = $this->execPHashListQuery($wSel, ' AND is_stopword=0');
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment