[TYPO3-core] RFC fix for bug #2507

Wolfgang Klinger wolfgang at stufenlos.net
Tue Feb 14 13:52:45 CET 2006


 *hiya!*
 
 Type: bugfix
 
 Wrong where clause ('1' instead of '1=1')
 BT reference: http://bugs.typo3.org/view.php?id=2507
 
 
 bye
 Wolfgang

-------------- next part --------------
--- TYPO3core/t3lib/class.t3lib_befunc.php	2006-02-14 13:20:03.000000000 +0100
+++ TYPO3core_testing/t3lib/class.t3lib_befunc.php	2006-02-14 13:42:46.000000000 +0100
@@ -3457,7 +3457,7 @@
 
 				// check if sys_refindex is empty
 			if (is_object($GLOBALS['TYPO3_DB']))	{
-				list($count) = $GLOBALS['TYPO3_DB']->exec_SELECTgetRows('count(*)','sys_refindex','1');
+				list($count) = $GLOBALS['TYPO3_DB']->exec_SELECTgetRows('count(*)','sys_refindex','1=1');
 				if (!$count['count(*)'])	{
 					$warnings[] = 'The Reference Index table is empty which is likely to be the case because you just upgraded your TYPO3 source. Please to the Tools>DB Check and update the reference index.';
 				}
-------------- next part --------------
--- TYPO3core/t3lib/class.t3lib_refindex.php	2006-02-02 08:40:55.000000000 +0100
+++ TYPO3core_testing/t3lib/class.t3lib_refindex.php	2006-02-14 13:43:26.000000000 +0100
@@ -640,7 +640,7 @@
 			$tableCount++;
 
 				// Traverse all non-deleted records in tables:
-			$allRecs = $TYPO3_DB->exec_SELECTgetRows('uid',$tableName,'1');	//.t3lib_BEfunc::deleteClause($tableName)
+			$allRecs = $TYPO3_DB->exec_SELECTgetRows('uid',$tableName,'1=1');	//.t3lib_BEfunc::deleteClause($tableName)
 			$uidList = array(0);
 			foreach($allRecs as $recdat)	{
 				$refIndexObj = t3lib_div::makeInstance('t3lib_refindex');


More information about the TYPO3-team-core mailing list