[BUGFIX] Use database name property in admin_get_tables 21/22021/4
authorHelmut Hummel <helmut.hummel@typo3.org>
Fri, 5 Jul 2013 10:46:07 +0000 (12:46 +0200)
committerMarkus Klein <klein.t3@mfc-linz.at>
Sat, 6 Jul 2013 15:10:44 +0000 (17:10 +0200)
The admin_get_tables method in the DatabaseConnection
uses the constant instead of the class property.
This delivers wrong results if using multiple
DatabaseConnection objects.

Use the class property instead.

Change-Id: I93e05fdabb53b170782c61ef4ebfa97190cddfb6
Resolves: #49738
Releases: 6.2, 6.1
Reviewed-on: https://review.typo3.org/22021
Reviewed-by: Markus Klein
Tested-by: Markus Klein
typo3/sysext/core/Classes/Database/DatabaseConnection.php

index e370a04..f34b98a 100644 (file)
@@ -1317,7 +1317,7 @@ class DatabaseConnection {
                        $this->connectDB();
                }
                $whichTables = array();
-               $tables_result = $this->link->query('SHOW TABLE STATUS FROM `' . TYPO3_db . '`');
+               $tables_result = $this->link->query('SHOW TABLE STATUS FROM `' . $this->databaseName . '`');
                if ($tables_result !== FALSE) {
                        while ($theTable = $tables_result->fetch_assoc()) {
                                $whichTables[$theTable['Name']] = $theTable;
@@ -1839,4 +1839,4 @@ class DatabaseConnection {
                );
        }
 }
-?>
\ No newline at end of file
+?>