|
10 | 10 | use PhpMyAdmin\Identifiers\DatabaseName; |
11 | 11 | use PhpMyAdmin\Identifiers\TableName; |
12 | 12 | use PhpMyAdmin\InternalRelations; |
13 | | -use PhpMyAdmin\RecentFavoriteTable; |
14 | 13 | use PhpMyAdmin\SqlParser\Parser; |
15 | 14 | use PhpMyAdmin\SqlParser\Statements\CreateStatement; |
16 | 15 | use PhpMyAdmin\SqlParser\Utils\Table as TableUtils; |
@@ -1622,32 +1621,13 @@ public function fixPmaTables(string $db, bool $create = true): void |
1622 | 1621 | } |
1623 | 1622 |
|
1624 | 1623 | $GLOBALS['cfg']['Server']['pmadb'] = $db; |
| 1624 | + |
| 1625 | + //NOTE: I am unsure why we do that, as it defeats the purpose of the session cache |
| 1626 | + // Unset the cache |
1625 | 1627 | unset($_SESSION['relation'][$GLOBALS['server']]); |
1626 | 1628 | unset(self::$cache[$GLOBALS['server']]); |
1627 | | - |
1628 | | - $relationParameters = $this->getRelationParameters(); |
1629 | | - if ( |
1630 | | - $relationParameters->recentlyUsedTablesFeature === null |
1631 | | - && $relationParameters->favoriteTablesFeature === null |
1632 | | - ) { |
1633 | | - return; |
1634 | | - } |
1635 | | - |
1636 | | - // Since configuration storage is updated, we need to |
1637 | | - // re-initialize the favorite and recent tables stored in the |
1638 | | - // session from the current configuration storage. |
1639 | | - if ($relationParameters->favoriteTablesFeature !== null) { |
1640 | | - $favTables = RecentFavoriteTable::getInstance('favorite'); |
1641 | | - $_SESSION['tmpval']['favoriteTables'][$GLOBALS['server']] = $favTables->getFromDb(); |
1642 | | - } |
1643 | | - |
1644 | | - if ($relationParameters->recentlyUsedTablesFeature !== null) { |
1645 | | - $recentTables = RecentFavoriteTable::getInstance('recent'); |
1646 | | - $_SESSION['tmpval']['recentTables'][$GLOBALS['server']] = $recentTables->getFromDb(); |
1647 | | - } |
1648 | | - |
1649 | | - // Reload navi panel to update the recent/favorite lists. |
1650 | | - $GLOBALS['reload'] = true; |
| 1629 | + // Fill back the cache |
| 1630 | + $this->getRelationParameters(); |
1651 | 1631 | } |
1652 | 1632 |
|
1653 | 1633 | /** |
|
0 commit comments