* Reverting patch for bug #4581 which was committed by mistake. The solution...
authorMichael Stucki <michael.stucki@typo3.org>
Thu, 18 Jan 2007 23:46:57 +0000 (23:46 +0000)
committerMichael Stucki <michael.stucki@typo3.org>
Thu, 18 Jan 2007 23:46:57 +0000 (23:46 +0000)
git-svn-id: https://svn.typo3.org/TYPO3v4/Core/trunk@1904 709f56b5-9817-0410-a4d7-c38de5d9e867

ChangeLog
t3lib/class.t3lib_db.php
t3lib/class.t3lib_tstemplate.php

index aa800ae..c6d5839 100755 (executable)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2007-01-19  Michael Stucki  <michael@typo3.org>
+
+       * Reverting patch for bug #4581 which was committed by mistake. The solution works well, but it depends on 4.3.0 currently...
+
 2007-01-18  Martin Kutschker  <martin.t.kutschker@blackbox.net>
 
        * Added PATH_typo3 to index_ts.php (see related change on 2006-10-29)
index a2e5fb9..4422bf9 100755 (executable)
@@ -854,26 +854,6 @@ class t3lib_DB {
        }
 
        /**
-        * Returns some information about actions that were performed
-        * after an UPDATE or DELETE query was sent to the database.
-        * All keys of the array are lowercased and whitspaces are removed.
-        * The returned array looks like this:
-        * Array('rowsmatched' => 1, 'changed' => 1, 'warnings' => 0)
-        *
-        * @return      array           And accociative array with information about the performed actions.
-        */
-       function sql_info() {
-               $info = array();
-               $sql_info = strtolower(mysql_info($this->link));
-               while (preg_match('/(\w[\w\s]+):\s+(\d+)\s*/', $sql_info, $matches)) {
-                       $sql_info = str_replace($matches[0], '', $sql_info);
-                       $matches[1] = str_replace(' ', '', $matches[1]);
-                       $info[$matches[1]] = $matches[2];
-               }
-               return $info;
-       }
-
-       /**
         * Move internal result pointer
         * mysql_data_seek() wrapper function
         * Usage count/core: 3
index 637b79e..a230217 100755 (executable)
@@ -362,9 +362,7 @@ class t3lib_TStemplate      {
                                );
                                $mpvar_hash = t3lib_div::md5int($GLOBALS['TSFE']->MP);
                                $GLOBALS['TYPO3_DB']->exec_UPDATEquery('cache_pagesection', 'page_id=' . intval($GLOBALS['TSFE']->id) . ' AND mpvar_hash=' . $mpvar_hash, $dbFields);
-                                       // get some information about the last performed SQL query
-                               $sql_info = $GLOBALS['TYPO3_DB']->sql_info();
-                               if ($sql_info['rowsmatched'] == 0) {
+                               if ($GLOBALS['TYPO3_DB']->sql_affected_rows() == 0) {
                                        $dbFields['page_id'] = intval($GLOBALS['TSFE']->id);
                                        $dbFields['mpvar_hash'] = $mpvar_hash;
                                        $GLOBALS['TYPO3_DB']->exec_INSERTquery('cache_pagesection', $dbFields);