Fixed bug #16486: BE livesearch results in errors when DBAL is installed
authorJigal van Hemert <jigal@xs4all.nl>
Sat, 20 Nov 2010 11:54:45 +0000 (11:54 +0000)
committerJigal van Hemert <jigal@xs4all.nl>
Sat, 20 Nov 2010 11:54:45 +0000 (11:54 +0000)
git-svn-id: https://svn.typo3.org/TYPO3v4/Core/trunk@9494 709f56b5-9817-0410-a4d7-c38de5d9e867

t3lib/search/class.t3lib_search_livesearch.php

index 1624c8e..9ee3325 100644 (file)
@@ -325,7 +325,7 @@ class t3lib_search_livesearch {
         */
        protected function makeQuerySearchByTable($tableName, $fieldsToSearchWithin) {
                        // free text search
-               $queryLikeStatement = ' LIKE \'%' . $this->getQueryString() . '%\'';
+               $queryLikeStatement = ' LIKE \'%' . $this->getQueryString($tableName) . '%\'';
                $queryPart                      = ' AND (' . implode($queryLikeStatement . ' OR ', $fieldsToSearchWithin) . $queryLikeStatement . ')';
                $queryPart                 .= t3lib_BEfunc::deleteClause($tableName);
                $queryPart                 .= t3lib_BEfunc::versioningPlaceholderClause($tableName);
@@ -394,11 +394,12 @@ class t3lib_search_livesearch {
        /**
         * Safely retrieve the queryString.
         *
+        * @param string $tableName
         * @return string
         * @see t3lib_db::quoteStr()
         */
-       public function getQueryString() {
-               return $GLOBALS['TYPO3_DB']->quoteStr($this->queryString, '');
+       public function getQueryString($tableName = '') {
+               return $GLOBALS['TYPO3_DB']->quoteStr($this->queryString, $tableName);
        }
 
        /**