fix bug #4555: detect double posts in tt_board
authorFranz Holzinger <holzinger@ttproducts.de>
Thu, 7 Dec 2006 17:09:13 +0000 (17:09 +0000)
committerFranz Holzinger <holzinger@ttproducts.de>
Thu, 7 Dec 2006 17:09:13 +0000 (17:09 +0000)
git-svn-id: https://svn.typo3.org/TYPO3v4/Core/trunk@1859 709f56b5-9817-0410-a4d7-c38de5d9e867

ChangeLog
typo3/sysext/cms/tslib/class.tslib_fetce.php

index f8e9325..62d22bc 100755 (executable)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2006-12-07  Franz Holzinger  <kontakt@fholzinger.com>
+
+       * Fix bug #4555: double posts in tt_board did not get detected because of unintended conversion into a negative integer
+
 2006-12-07  Ingmar Schlecht  <ingmar@typo3.org>
 
        * Disabled typo3/alt_main_new.php as it's not fully working yet. Will be ready for TYPO3 4.2 probably, but not for 4.1.
index b532c8f..97fa51b 100644 (file)
@@ -185,7 +185,8 @@ class tslib_feTCE   {
         * @access private
         */
        function checkDoublePostExist($table,$doublePostField,$key)     {
-               $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery('count(*)', $table, $doublePostField.'='.intval($key));
+               $where = $doublePostField.'='.$key;
+               $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery('count(*)', $table, $where);
                $row = $GLOBALS['TYPO3_DB']->sql_fetch_row($res);
                return $row[0];
        }