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

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

index 5f663c5..010b4b7 100755 (executable)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2006-12-07  Franz Holzinger  <kontakt@fholzinger.com>
+
+       * Fixed bug #4555: double posts in tt_board did not get detected because of unintended conversion into a negative integer
+
 2006-12-05  Michael Stucki  <michael@typo3.org>
 
        * Release of TYPO3 4.0.3
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];
        }