Project

General

Profile

Bug #23103 » bug_15001.patch

Administrator Admin, 2010-07-05 00:29

View differences:

t3lib/class.t3lib_db.php (working copy)
$queryParts = array();
foreach($searchWords as $sw) {
$like = ' LIKE \'%' . $this->quoteStr($sw, $table) . '%\'';
$like = ' LIKE \'%' . $this->escapeStrForLike($this->quoteStr($sw, $table), $table) . '%\'';
$queryParts[] = $table . '.' . implode($like . ' OR ' . $table . '.', $fields) . $like;
}
$query = '(' . implode(') AND (', $queryParts) . ')';
typo3/class.db_list.inc (working copy)
// If search-fields were defined (and there always are) we create the query:
if (count($sfields)) {
$like = ' LIKE \'%'.$GLOBALS['TYPO3_DB']->quoteStr($this->searchString, $table).'%\''; // Free-text searching...
$queryPart = ' AND ('.implode($like.' OR ',$sfields).$like.')';
// Return query:
return $queryPart;
return ' AND ' . $GLOBALS['TYPO3_DB']->searchQuery(array($this->searchString), $sfields, $table);
}
}
}
(1-1/4)