From db6af26e474101857756904a94890db6c4ca3f8c Mon Sep 17 00:00:00 2001 From: ayusun Date: Sun, 12 May 2013 21:37:32 +0530 Subject: [PATCH 1/3] Bug fix 3898-Structure/page not refreshed. Updating Table stats --- js/tbl_structure.js | 8 ++++++-- libraries/Index.class.php | 2 +- tbl_structure.php | 18 +++++++++++------- 3 files changed, 18 insertions(+), 10 deletions(-) diff --git a/js/tbl_structure.js b/js/tbl_structure.js index ea043e557a..4ffc939ba8 100644 --- a/js/tbl_structure.js +++ b/js/tbl_structure.js @@ -150,7 +150,7 @@ AJAX.registerOnload('tbl_structure.js', function() { var question = $.sprintf(PMA_messages['strDoYouReally'], 'ALTER TABLE `' + escapeHtml(curr_table_name) + '` DROP `' + escapeHtml(curr_column_name) + '`;'); $(this).PMA_confirm(question, $(this).attr('href'), function(url) { var $msg = PMA_ajaxShowMessage(PMA_messages['strDroppingColumn'], false); - $.get(url, {'is_js_confirmed' : 1, 'ajax_request' : true}, function(data) { + $.get(url, {'is_js_confirmed' : 1, 'ajax_request' : true, 'ajax_page_request' : true}, function (data) { if (data.success == true) { PMA_ajaxRemoveMessage($msg); if ($('#result_query').length) { @@ -169,8 +169,12 @@ AJAX.registerOnload('tbl_structure.js', function() { } $after_field_item.remove(); $curr_row.hide("medium").remove(); + //refresh table stats + if (data.tableStat) { + $('#tablestatistics').html(data.tableStat); + } // refresh the list of indexes (comes from sql.php) - $('#indexes').html(data.indexes_list); + $('.index_info').replaceWith(data.indexes_list); PMA_reloadNavigation(); } else { PMA_ajaxShowMessage(PMA_messages['strErrorProcessingRequest'] + " : " + data.error, false); diff --git a/libraries/Index.class.php b/libraries/Index.class.php index 152b155475..c349ea4d53 100644 --- a/libraries/Index.class.php +++ b/libraries/Index.class.php @@ -532,7 +532,7 @@ class PMA_Index $no_indexes .= ''; if (! $print_mode) { - $r = '
'; + $r = '
'; $r .= '' . __('Indexes'); $r .= PMA_Util::showMySQLDocu( 'optimization', 'optimizing-database-structure' diff --git a/tbl_structure.php b/tbl_structure.php index 60b4b93b23..1999883ce2 100644 --- a/tbl_structure.php +++ b/tbl_structure.php @@ -436,6 +436,8 @@ if (! $tbl_is_view && ! $db_is_information_schema && 'ARCHIVE' != $tbl_storage_engine ) { + //return the list of index + $response->addJSON('indexes_list', PMA_Index::getView($GLOBALS['table'], $GLOBALS['db'])); $response->addHTML(PMA_getHtmlForDisplayIndexes()); } @@ -445,13 +447,15 @@ if (! $tbl_is_view // BEGIN - Calc Table Space // Get valid statistics whatever is the table type if ($cfg['ShowStats']) { - $response->addHTML( - PMA_getHtmlForDisplayTableStats( - $showtable, $table_info_num_rows, $tbl_is_view, - $db_is_information_schema, $tbl_storage_engine, - $url_query, $tbl_collation - ) - ); + //get table stats in HTML format + $tablestats = PMA_getHtmlForDisplayTableStats( + $showtable, $table_info_num_rows, $tbl_is_view, + $db_is_information_schema, $tbl_storage_engine, + $url_query, $tbl_collation + ); + //returning the response in JSON format to be used by Ajax + $response->addJSON('tableStat', $tablestats); + $response->addHTML($tablestats); } // END - Calc Table Space From 837b79472355f79ab4350faf986ffe4749564513 Mon Sep 17 00:00:00 2001 From: Lassi Ruonavaara Date: Sun, 12 May 2013 22:13:43 +0200 Subject: [PATCH 2/3] Translated using Weblate (Finnish) Currently translated at 70.1% (1827 of 2607) --- po/fi.po | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/po/fi.po b/po/fi.po index 95a231a32d..ad3a2633c1 100644 --- a/po/fi.po +++ b/po/fi.po @@ -4,15 +4,15 @@ msgstr "" "Project-Id-Version: phpMyAdmin 4.0.1-dev\n" "Report-Msgid-Bugs-To: phpmyadmin-devel@lists.sourceforge.net\n" "POT-Creation-Date: 2013-05-02 13:12+0200\n" -"PO-Revision-Date: 2013-04-06 13:51+0200\n" -"Last-Translator: Jouni Kähkönen \n" +"PO-Revision-Date: 2013-05-12 22:13+0200\n" +"Last-Translator: Lassi Ruonavaara \n" "Language-Team: Finnish \n" "Language: fi\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=n != 1;\n" -"X-Generator: Weblate 1.5-dev\n" +"X-Generator: Weblate 1.6-dev\n" #: browse_foreigners.php:36 browse_foreigners.php:60 js/messages.php:344 #: libraries/DisplayResults.class.php:809 @@ -1595,7 +1595,7 @@ msgstr "Virhe pyynnön käsittelyssä" #: js/messages.php:225 #, php-format msgid "Error code: %s" -msgstr "" +msgstr "Virhekoodi: %s" #: js/messages.php:226 #, php-format From 8a4f44f6ebe81b11756fa79c67e2a81ad55a250c Mon Sep 17 00:00:00 2001 From: Marc Delisle Date: Mon, 13 May 2013 12:59:41 -0400 Subject: [PATCH 3/3] ChangeLog entry for bug #3898 Structure not refreshed after column drop --- ChangeLog | 1 + 1 file changed, 1 insertion(+) diff --git a/ChangeLog b/ChangeLog index 0d5123cb2b..ad43c86ed8 100644 --- a/ChangeLog +++ b/ChangeLog @@ -6,6 +6,7 @@ phpMyAdmin - ChangeLog - bug #3925 Table sorting in navigation panel is case-sensitive - bug #3915 Import of CSV file (Replace table data with file) with duplicate values +- bug #3898 Structure not refreshed after column drop 4.0.1.0 (not yet released) - bug #3879 Import broken for CSV using LOAD DATA