[BUGFIX] Use database name property in admin_get_tables 22/22022/2
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:11:23 +0000 (17:11 +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/22022
Reviewed-by: Markus Klein
Tested-by: Markus Klein
typo3/sysext/core/Classes/Database/DatabaseConnection.php

index 032c346..58d0569 100644 (file)
@@ -1318,7 +1318,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;