diff --git a/libraries/Menu.php b/libraries/Menu.php index b1aa958d0f..665480f051 100644 --- a/libraries/Menu.php +++ b/libraries/Menu.php @@ -236,8 +236,7 @@ class Menu $GLOBALS['db'], $GLOBALS['table'] ); - $reread_info = $table_class_object->getStatusInfo(null, true); - $GLOBALS['showtable'] = $table_class_object->getStatusInfo(null, (isset($reread_info) && $reread_info ? true : false)); + $GLOBALS['showtable'] = $table_class_object->getStatusInfo(null, true); if ($table_class_object->isView()) { $tbl_is_view = true; $show_comment = null; diff --git a/libraries/controllers/table/TableChartController.php b/libraries/controllers/table/TableChartController.php index bebe9f4396..c537a668a4 100644 --- a/libraries/controllers/table/TableChartController.php +++ b/libraries/controllers/table/TableChartController.php @@ -120,8 +120,7 @@ class TableChartController extends TableController $GLOBALS['db'], $GLOBALS['table'] ); - $reread_info = $table_class_object->getStatusInfo(null, true); - $GLOBALS['showtable'] = $table_class_object->getStatusInfo(null, (isset($reread_info) && $reread_info ? true : false)); + $GLOBALS['showtable'] = $table_class_object->getStatusInfo(null, true); if ($table_class_object->isView()) { $tbl_is_view = true; $tbl_storage_engine = __('View'); diff --git a/libraries/controllers/table/TableIndexesController.php b/libraries/controllers/table/TableIndexesController.php index bcb57f1b18..6ecd6a6da1 100644 --- a/libraries/controllers/table/TableIndexesController.php +++ b/libraries/controllers/table/TableIndexesController.php @@ -68,8 +68,7 @@ class TableIndexesController extends TableController $GLOBALS['db'], $GLOBALS['table'] ); - $reread_info = $table_class_object->getStatusInfo(null, true); - $GLOBALS['showtable'] = $table_class_object->getStatusInfo(null, (isset($reread_info) && $reread_info ? true : false)); + $GLOBALS['showtable'] = $table_class_object->getStatusInfo(null, true); if ($table_class_object->isView()) { $tbl_is_view = true; $tbl_storage_engine = __('View'); diff --git a/tbl_operations.php b/tbl_operations.php index 175fecea76..6ccbed741e 100644 --- a/tbl_operations.php +++ b/tbl_operations.php @@ -87,7 +87,7 @@ $pma_table = $GLOBALS['dbi']->getTable( $GLOBALS['db'], $GLOBALS['table'] ); -$reread_info = $pma_table->getStatusInfo(null, false); +$reread_info = false; $table_alters = array(); /** @@ -133,7 +133,7 @@ if (isset($_REQUEST['submitoptions'])) { $_message .= $pma_table->getLastMessage(); $result = true; $GLOBALS['table'] = $pma_table->getName(); - $reread_info = $pma_table->getStatusInfo(null, true); + $reread_info = true; $reload = true; } else { $_message .= $pma_table->getLastError(); @@ -214,7 +214,7 @@ if ($reread_info) { // a change, clear the cache $GLOBALS['dbi']->clearTableCache(); $GLOBALS['dbi']->selectDb($GLOBALS['db']); - $GLOBALS['showtable'] = $pma_table->getStatusInfo(null, (isset($reread_info) && $reread_info ? true : false)); + $GLOBALS['showtable'] = $pma_table->getStatusInfo(null, true); if ($pma_table->isView()) { $tbl_is_view = true; $tbl_storage_engine = __('View'); @@ -230,6 +230,7 @@ if ($reread_info) { $auto_increment = $pma_table->getAutoIncrementInfo(); $create_options = $pma_table->createOptionsArray(); } +unset($reread_info); if (isset($result) && empty($message_to_show)) { if (empty($_message)) { diff --git a/test/classes/TableTest.php b/test/classes/TableTest.php index 55e6bb9c21..fbe982e94a 100644 --- a/test/classes/TableTest.php +++ b/test/classes/TableTest.php @@ -1211,7 +1211,7 @@ class TableTest extends PMATestCase $target_table = 'table1'; $target_db = 'pma_test'; $tbl_object = new Table($target_db, $target_table); - $reread_info = $tbl_object->getStatusInfo(null, true); + $tbl_object->getStatusInfo(null, true); $extension = new PMA\libraries\dbi\DBIDummy(); $dbi = new PMA\libraries\DatabaseInterface($extension); $expect = ''; @@ -1234,7 +1234,7 @@ class TableTest extends PMATestCase $target_table = 'table1'; $target_db = 'pma_test'; $tbl_object = new Table($target_db, $target_table); - $reread_info = $tbl_object->getStatusInfo(null, true); + $tbl_object->getStatusInfo(null, true); $extension = new PMA\libraries\dbi\DBIDummy(); $dbi = new PMA\libraries\DatabaseInterface($extension); $expect = ''; @@ -1257,7 +1257,7 @@ class TableTest extends PMATestCase $target_table = 'table1'; $target_db = 'pma_test'; $tbl_object = new Table($target_db, $target_table); - $reread_info = $tbl_object->getStatusInfo(null, true); + $tbl_object->getStatusInfo(null, true); $extension = new PMA\libraries\dbi\DBIDummy(); $dbi = new PMA\libraries\DatabaseInterface($extension); $expect = ''; @@ -1280,7 +1280,7 @@ class TableTest extends PMATestCase $target_table = 'table1'; $target_db = 'pma_test'; $tbl_object = new Table($target_db, $target_table); - $reread_info = $tbl_object->getStatusInfo(null, true); + $tbl_object->getStatusInfo(null, true); $extension = new PMA\libraries\dbi\DBIDummy(); $dbi = new PMA\libraries\DatabaseInterface($extension); $expect = ''; @@ -1303,7 +1303,7 @@ class TableTest extends PMATestCase $target_table = 'table1'; $target_db = 'pma_test'; $tbl_object = new Table($target_db, $target_table); - $reread_info = $tbl_object->getStatusInfo(null, true); + $tbl_object->getStatusInfo(null, true); $extension = new PMA\libraries\dbi\DBIDummy(); $dbi = new PMA\libraries\DatabaseInterface($extension); $expect = ''; @@ -1326,7 +1326,7 @@ class TableTest extends PMATestCase $target_table = 'table1'; $target_db = 'pma_test'; $tbl_object = new Table($target_db, $target_table); - $reread_info = $tbl_object->getStatusInfo(null, true); + $tbl_object->getStatusInfo(null, true); $extension = new PMA\libraries\dbi\DBIDummy(); $dbi = new PMA\libraries\DatabaseInterface($extension); $expect = array('pack_keys' => 'DEFAULT'); diff --git a/view_operations.php b/view_operations.php index ae180deb78..57732793aa 100644 --- a/view_operations.php +++ b/view_operations.php @@ -36,11 +36,6 @@ require './libraries/tbl_common.inc.php'; $url_query .= '&goto=view_operations.php&back=view_operations.php'; $url_params['goto'] = $url_params['back'] = 'view_operations.php'; -/** - * Gets tables information - */ -$reread_info = $pma_table->getStatusInfo(null, false); - /** * Updates if required */ @@ -53,7 +48,8 @@ if (isset($_REQUEST['submitoptions'])) { $_message->addText($pma_table->getLastMessage()); $result = true; $GLOBALS['table'] = $pma_table->getName(); - $reread_info = $pma_table->getStatusInfo(null, true); + /* Force reread after rename */ + $pma_table->getStatusInfo(null, true); $reload = true; } else { $_message->addText($pma_table->getLastError());