diff --git a/ChangeLog b/ChangeLog index 2f7ed46f30..019958d8e0 100644 --- a/ChangeLog +++ b/ChangeLog @@ -36,6 +36,7 @@ phpMyAdmin - ChangeLog - bug #4896 Non-styled error page when following results link - bug #4894 Deleting without confirmation - bug #4858 Issues with SQL autocomplete +- bug #4897 Column hint in SQL autocomplete is sometimes not shown 4.4.6.0 (2015-05-07) - bug #4890 webkitStorageInfo and webkitIndexedDB is deprecated diff --git a/js/functions.js b/js/functions.js index 62556bb86a..4330eea786 100644 --- a/js/functions.js +++ b/js/functions.js @@ -1769,12 +1769,12 @@ function codemirrorAutocompleteOnInputRead(instance) { data: params, success: function (data) { if (data.success) { - sql_autocomplete = $.parseJSON(data.tables); + var tables = $.parseJSON(data.tables); sql_autocomplete_default_table = PMA_commonParams.get('table'); - var result = []; - for (var table in sql_autocomplete) { - if (sql_autocomplete.hasOwnProperty(table)) { - var columns = sql_autocomplete[table]; + sql_autocomplete = []; + for (var table in tables) { + if (tables.hasOwnProperty(table)) { + var columns = tables[table]; table = { text: table, columns: [] @@ -1794,9 +1794,9 @@ function codemirrorAutocompleteOnInputRead(instance) { } } } - result.push(table); + sql_autocomplete.push(table); } - instance.options.hintOptions.tables = result; + instance.options.hintOptions.tables = sql_autocomplete; instance.options.hintOptions.defaultTable = sql_autocomplete_default_table; } },