From 2678154e2ffec6c77bc46fb8503673c5264afaa6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20=C4=8Ciha=C5=99?= Date: Tue, 25 Oct 2005 22:03:14 +0000 Subject: [PATCH] Reread table information after change, so that rendered page contains change, that has been just done. --- ChangeLog | 2 ++ tbl_properties_operations.php | 10 ++++++++++ 2 files changed, 12 insertions(+) diff --git a/ChangeLog b/ChangeLog index 44b8bcfd4..5899211d5 100755 --- a/ChangeLog +++ b/ChangeLog @@ -9,6 +9,8 @@ $Source$ * lang/english: "Log in" is correct naming for action (RFE #945440). * tbl_properties_operations.php: Allow to change auto_increment for InnoDB, supported since MySQL 5.0.3 (bug #1337873). + * tbl_properties_operations.php: Reread table information after change, so + that rendered page contains change, that has been just done. 2005-10-24 Michal Čihař * tbl_properties_operations.php: Fix changing table attributes, reread new diff --git a/tbl_properties_operations.php b/tbl_properties_operations.php index 5fcb3d643..ade8563b9 100644 --- a/tbl_properties_operations.php +++ b/tbl_properties_operations.php @@ -26,6 +26,8 @@ require_once('./libraries/storage_engines.lib.php'); // the calling of relation.lib.php) PMA_DBI_select_db($db); +$reread_info = FALSE; + /** * Updates table comment, type and options if required */ @@ -34,12 +36,14 @@ if (isset($submitcomment)) { $sql_query = 'ALTER TABLE ' . PMA_backquote($table) . ' COMMENT = \'' . PMA_sqlAddslashes($comment) . '\''; $result = PMA_DBI_query($sql_query); $message = $strSuccess; + $reread_info = TRUE; } } if (isset($submittype)) { $sql_query = 'ALTER TABLE ' . PMA_backquote($table) . ' TYPE = ' . $new_tbl_type; $result = PMA_DBI_query($sql_query); $message = $strSuccess; + $reread_info = TRUE; } if (isset($submitcollation)) { // since something modifies $tbl_collation between the moment it is @@ -50,6 +54,7 @@ if (isset($submitcollation)) { $result = PMA_DBI_query($sql_query); $message = $strSuccess; unset($tbl_collation); + $reread_info = TRUE; } if (isset($submitoptions)) { $sql_query = 'ALTER TABLE ' . PMA_backquote($table); @@ -65,8 +70,13 @@ if (isset($submitoptions)) { } $result = PMA_DBI_query($sql_query); $message = $strSuccess; + $reread_info = TRUE; +} + +if ($reread_info) { require('./tbl_properties_table_info.php'); } +unset($reread_info); /** * Reordering the table has been requested by the user