* Added Karsten D.s patches for DBAL.
[Packages/TYPO3.CMS.git] / typo3 / class.db_list.inc
index d7f037d..856728c 100755 (executable)
@@ -292,7 +292,7 @@ class recordList extends t3lib_recordList {
                if (!t3lib_extMgm::isLoaded('sys_note'))        return '';
 
                        // Create query for selecting the notes:
-               $result = $GLOBALS['TYPO3_DB']->exec_SELECTquery('*','sys_note','pid IN ('.$this->id.') AND (!personal OR cruser="'.intval($GLOBALS['BE_USER']->user['uid']).'")'.t3lib_BEfunc::deleteClause('sys_note'));
+               $result = $GLOBALS['TYPO3_DB']->exec_SELECTquery('*','sys_note','pid IN ('.$this->id.') AND (personal=0 OR cruser='.intval($GLOBALS['BE_USER']->user['uid']).')'.t3lib_BEfunc::deleteClause('sys_note'));
 
                        // Executing query:
                $dbCount = $GLOBALS['TYPO3_DB']->sql_num_rows($result);
@@ -478,7 +478,7 @@ class recordList extends t3lib_recordList {
 
                                // 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...
+                               $like = ' LIKE \'%'.$GLOBALS['TYPO3_DB']->quoteStr($this->searchString, $table).'%\'';          // Free-text searching...
                                $queryPart = ' AND ('.implode($like.' OR ',$sfields).$like.')';
 
                                        // Return query: