From 87eec542eff63e6a9c36e0dbe49e0b1a5e868caa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Chapeaux?= Date: Fri, 3 May 2002 11:33:40 +0000 Subject: [PATCH] messages are now displayed if a query had been submitted to change some table options --- ChangeLog | 4 +++- tbl_properties_options.php3 | 31 +++++++++++++++++++++---------- 2 files changed, 24 insertions(+), 11 deletions(-) diff --git a/ChangeLog b/ChangeLog index df865df77..260d17eb9 100755 --- a/ChangeLog +++ b/ChangeLog @@ -6,7 +6,9 @@ $Id$ $Source$ 2002-05-03 Loïc Chapeaux - * lang/italian.inc.php3: Updated, thanks to Pietro Danesi. + * lang/italian.inc.php3: updated, thanks to Pietro Danesi. + * tbl_properties_options.php3: messages are now display if a query had been + submitted to change some options. 2002-05-02 Loïc Chapeaux * lang/*.inc.php3: cleanup. diff --git a/tbl_properties_options.php3 b/tbl_properties_options.php3 index ad4441fd8..fd95c62e0 100755 --- a/tbl_properties_options.php3 +++ b/tbl_properties_options.php3 @@ -3,7 +3,7 @@ /** - * Gets tables informations and displays top links + * Runs common work */ require('./tbl_properties_common.php3'); @@ -16,23 +16,34 @@ if (isset($submitcomment)) { $comment = stripslashes($comment); } if (empty($prev_comment) || urldecode($prev_comment) != $comment) { - $local_query = 'ALTER TABLE ' . PMA_backquote($table) . ' COMMENT = \'' . PMA_sqlAddslashes($comment) . '\''; - $result = mysql_query($local_query) or PMA_mysqlDie('', $local_query, '', $err_url); + $sql_query = 'ALTER TABLE ' . PMA_backquote($table) . ' COMMENT = \'' . PMA_sqlAddslashes($comment) . '\''; + $result = mysql_query($sql_query) or PMA_mysqlDie('', $sql_query, '', $err_url); + $message = $strSuccess; } } if (isset($submittype)) { - $local_query = 'ALTER TABLE ' . PMA_backquote($table) . ' TYPE = ' . $tbl_type; - $result = mysql_query($local_query) or PMA_mysqlDie('', $local_query, '', $err_url); + $sql_query = 'ALTER TABLE ' . PMA_backquote($table) . ' TYPE = ' . $tbl_type; + $result = mysql_query($sql_query) or PMA_mysqlDie('', $sql_query, '', $err_url); + $message = $strSuccess; } if (isset($submitoptions)) { - $local_query = 'ALTER TABLE ' . PMA_backquote($table) - . (isset($pack_keys) ? ' pack_keys=1': ' pack_keys=0') - . (isset($checksum) ? ' checksum=1': ' checksum=0') - . (isset($delay_key_write) ? ' delay_key_write=1': ' delay_key_write=0'); - $result = mysql_query($local_query) or PMA_mysqlDie('', $local_query, '', $err_url); + $sql_query = 'ALTER TABLE ' . PMA_backquote($table) + . (isset($pack_keys) ? ' pack_keys=1': ' pack_keys=0') + . (isset($checksum) ? ' checksum=1': ' checksum=0') + . (isset($delay_key_write) ? ' delay_key_write=1': ' delay_key_write=0'); + $result = mysql_query($sql_query) or PMA_mysqlDie('', $sql_query, '', $err_url); + $message = $strSuccess; +} + +// Displays a message if a query had been submitted +if (isset($message)) { + PMA_showMessage((get_magic_quotes_gpc()) ? addslashes($message) : $message); } +/** + * Gets tables informations and displays top links + */ require('./tbl_properties_table_info.php3');