From f4e8e080d3c516759b19dcfdc588a3a51dea9f85 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20=C4=8Ciha=C5=99?= Date: Thu, 27 Apr 2006 12:32:11 +0000 Subject: [PATCH] Reload language file after switch to utf-8 translation (bug #1442605). --- ChangeLog | 3 +++ libraries/tbl_properties_table_info.inc.php | 3 +++ tbl_properties_operations.php | 22 ++++++++++++--------- 3 files changed, 19 insertions(+), 9 deletions(-) diff --git a/ChangeLog b/ChangeLog index ed2f87d62..cfbdae0d5 100755 --- a/ChangeLog +++ b/ChangeLog @@ -30,6 +30,9 @@ $Source$ * libraries/language.lib.php, libraries/common.lib.php, libraries/database_interface.lib.php, libraries/select_lang.lib.php: Reload language file after switch to utf-8 translation (bug #1442605). + * tbl_properties_operations.php, + libraries/tbl_properties_table_info.inc.php: Allow to set PACK_KEYS to + DEFAULT (bug #1440966). 2006-04-26 Michal Čihař * libraries/plugin_interface.lib.php: diff --git a/libraries/tbl_properties_table_info.inc.php b/libraries/tbl_properties_table_info.inc.php index 94063a2d6..dad94d05a 100644 --- a/libraries/tbl_properties_table_info.inc.php +++ b/libraries/tbl_properties_table_info.inc.php @@ -91,12 +91,15 @@ if ($table_info_result && PMA_DBI_num_rows($table_info_result) > 0) { // export create options by its name as variables into gloabel namespace // f.e. pack_keys=1 becomes available as $pack_keys with value of '1' + unset($pack_keys); foreach ( $create_options as $each_create_option ) { $each_create_option = explode('=', $each_create_option); if ( isset( $each_create_option[1] ) ) { $$each_create_option[0] = $each_create_option[1]; } } + // we need explicit DEFAULT value here (different from '0') + $pack_keys = (!isset($pack_keys) || strlen($pack_keys) == 0) ? 'DEFAULT' : $pack_keys; unset( $create_options, $each_create_option ); } // end if ?> diff --git a/tbl_properties_operations.php b/tbl_properties_operations.php index 4b59dfd0b..9ea66bcd3 100644 --- a/tbl_properties_operations.php +++ b/tbl_properties_operations.php @@ -73,10 +73,8 @@ if (isset($_REQUEST['submitoptions'])) { $l_tbl_type = strtolower($tbl_type); - $pack_keys = empty($pack_keys) ? '0' : '1'; - $_REQUEST['new_pack_keys'] = empty($_REQUEST['new_pack_keys']) ? '0' : '1'; if (($l_tbl_type === 'myisam' || $l_tbl_type === 'isam') - && $_REQUEST['new_pack_keys'] !== $pack_keys) { + && $_REQUEST['new_pack_keys'] != (string)$pack_keys) { $table_alters[] = 'pack_keys = ' . $_REQUEST['new_pack_keys']; } @@ -123,7 +121,7 @@ if (isset($_REQUEST['submitorderby']) && ! empty($_REQUEST['order_field'])) { if ($reread_info) { - $pack_keys = $checksum = $delay_key_write = 0; + $checksum = $delay_key_write = 0; require './libraries/tbl_properties_table_info.inc.php'; } unset($reread_info); @@ -273,11 +271,17 @@ if ($tbl_type == 'MYISAM' || $tbl_type == 'ISAM') { ?> - /> +