From ba3ffcf644a9bd91324999c6d200b1bb3af7d84c Mon Sep 17 00:00:00 2001 From: Ingmar Schlecht Date: Fri, 22 Feb 2008 10:33:42 +0000 Subject: [PATCH] Fixed bug #7158: DBAL fixes to Indexed Search backend module git-svn-id: https://svn.typo3.org/TYPO3v4/Core/trunk@3247 709f56b5-9817-0410-a4d7-c38de5d9e867 --- ChangeLog | 1 + typo3/sysext/indexed_search/mod/index.php | 8 ++++---- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index 69019b39612e..7fc2b75b06c6 100755 --- a/ChangeLog +++ b/ChangeLog @@ -1,6 +1,7 @@ 2008-02-22 Ingmar Schlecht * Added feature #7526: Making loginNews look nicer (Thanks to Steffen Kamper) + * Fixed bug #7158: DBAL fixes to Indexed Search backend module (Thanks to Moreno Feltscher) 2008-02-21 Benjamin Mack diff --git a/typo3/sysext/indexed_search/mod/index.php b/typo3/sysext/indexed_search/mod/index.php index 406087b06808..476d8fc14dfc 100755 --- a/typo3/sysext/indexed_search/mod/index.php +++ b/typo3/sysext/indexed_search/mod/index.php @@ -2,7 +2,7 @@ /*************************************************************** * Copyright notice * -* (c) 1999-2005 Kasper Skaarhoj (kasperYYYY@typo3.com) +* (c) 1999-2008 Kasper Skaarhoj (kasperYYYY@typo3.com) * All rights reserved * * This script is part of the TYPO3 project. The TYPO3 project is @@ -299,7 +299,7 @@ class SC_mod_tools_isearch_index { ); // TYPO3 pages, unique - $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery('count(*) AS pcount,index_phash.*', 'index_phash', 'data_page_id!=0', 'phash_grouping,phash,cHashParams,data_filename,data_page_id,data_page_reg1,data_page_type,data_page_mp,gr_list,item_type,item_title,item_description,item_mtime,tstamp,item_size,contentHash,crdate,parsetime,sys_language_uid,item_crdate,externalUrl,recordUid,freeIndexUid', 'data_page_id'); + $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery('count(*) AS pcount,index_phash.*', 'index_phash', 'data_page_id!=0', 'phash_grouping,phash,cHashParams,data_filename,data_page_id,data_page_reg1,data_page_type,data_page_mp,gr_list,item_type,item_title,item_description,item_mtime,tstamp,item_size,contentHash,crdate,parsetime,sys_language_uid,item_crdate,externalUrl,recordUid,freeIndexUid,freeIndexSetId', 'data_page_id'); while($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res)) { $cHash = count(unserialize($row["cHashParams"])) ? $this->formatCHash(unserialize($row["cHashParams"])) : ""; @@ -367,7 +367,7 @@ class SC_mod_tools_isearch_index { ); // TYPO3 pages, unique - $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery('count(*) AS pcount,index_phash.*', 'index_phash', 'item_type>0', 'phash_grouping,phash,cHashParams,data_filename,data_page_id,data_page_reg1,data_page_type,data_page_mp,gr_list,item_type,item_title,item_description,item_mtime,tstamp,item_size,contentHash,crdate,parsetime,sys_language_uid,item_crdate,externalUrl,recordUid,freeIndexUid', 'item_type'); + $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery('count(*) AS pcount,index_phash.*', 'index_phash', 'item_type!=\'0\'', 'phash_grouping,phash,cHashParams,data_filename,data_page_id,data_page_reg1,data_page_type,data_page_mp,gr_list,item_type,item_title,item_description,item_mtime,tstamp,item_size,contentHash,crdate,parsetime,sys_language_uid,item_crdate,externalUrl,recordUid,freeIndexUid,freeIndexSetId', 'item_type'); while($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res)) { $cHash = count(unserialize($row["cHashParams"])) ? $this->formatCHash(unserialize($row["cHashParams"])) : ""; @@ -533,7 +533,7 @@ class SC_mod_tools_isearch_index { */ function countUniqueTypes($item_type) { // TYPO3 pages, unique - $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery('count(*)', 'index_phash', 'item_type='.intval($item_type), 'phash_grouping'); + $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery('count(*)', 'index_phash', 'item_type='.$GLOBALS['TYPO3_DB']->fullQuoteStr($item_type, 'index_phash'), 'phash_grouping'); $items = array(); while($row = $GLOBALS['TYPO3_DB']->sql_fetch_row($res)) { $items[] = $row; -- 2.20.1