Added $GLOBALS['TYPO3_DB']->sql_free_result() to TCEmain::recordInfo() to avoid resou...
authorDmitry Dulepov <dmitry.dulepov@gmail.com>
Mon, 21 May 2007 12:06:35 +0000 (12:06 +0000)
committerDmitry Dulepov <dmitry.dulepov@gmail.com>
Mon, 21 May 2007 12:06:35 +0000 (12:06 +0000)
git-svn-id: https://svn.typo3.org/TYPO3v4/Core/trunk@2345 709f56b5-9817-0410-a4d7-c38de5d9e867

ChangeLog
t3lib/class.t3lib_tcemain.php

index d027916..70c7283 100755 (executable)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,7 @@
 2007-05-04  Dmitry Dulepov  <dmitry@typo3.org>
 
        * Fixed bug 5550: 'lower' TCA specification may fail with non-ascii characters
+       * Added $GLOBALS['TYPO3_DB']->sql_free_result() to TCEmain::recordInfo() to avoid resource waste
 
 2007-05-18  Martin Kutschker  <martin.t.kutschker@blackbox.net>
 
index e7c9cf7..303d0fe 100755 (executable)
@@ -526,7 +526,7 @@ class t3lib_TCEmain {
         *
         * Note: When using the hook after INSERT operations, you will only get the temporary NEW... id passed to your hook as $id,
         *               but you can easily translate it to the real uid of the inserted record using the $this->substNEWwithIDs array.
-        * 
+        *
         * @param       object          $hookObjectsArr: (reference) Array with hook objects
         * @param       string          $status: (reference) Status of the current operation, 'new' or 'update
         * @param       string          $table: (refrence) The table currently processing data for
@@ -4945,7 +4945,9 @@ $this->log($table,$id,6,0,0,'Stage raised...',30,array('comment'=>$comment,'stag
                if (is_array($TCA[$table]))     {
                        $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery($fieldList, $table, 'uid='.intval($id));
                        if ($GLOBALS['TYPO3_DB']->sql_num_rows($res))   {
-                               return $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res);
+                               $result = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res);
+                               $GLOBALS['TYPO3_DB']->sql_free_result($res);
+                               return $result;
                        }
                }
        }