diff --git a/ChangeLog b/ChangeLog
index 2e46f50252..c22786f7c8 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -9,6 +9,7 @@ phpMyAdmin - ChangeLog
+ rfe #1609 Additional page locking
+ rfe #1620 Support MySQL 5.7 syntax for password change
+ rfe #1626 Display/edit index name
++ rfe #1625 Toggle autocomplete of table and column names
4.4.0.0 (not yet released)
+ rfe #1553 InnoDB presently supports one FULLTEXT index creation at a time
diff --git a/db_sql_autocomplete.php b/db_sql_autocomplete.php
index 4897f0058a..3be88c43ca 100644
--- a/db_sql_autocomplete.php
+++ b/db_sql_autocomplete.php
@@ -8,17 +8,19 @@
require_once 'libraries/common.inc.php';
-$db = isset($_POST['db']) ? $_POST['db'] : $GLOBALS['db'];
-$sql_autocomplete = array();
-
-if ($db) {
- $tableNames = $GLOBALS['dbi']->getTables($db);
- foreach ($tableNames as $tableName) {
- $sql_autocomplete[$tableName] = $GLOBALS['dbi']->getColumns(
- $db, $tableName
- );
+if ($GLOBALS['cfg']['EnableAutocompleteForTablesAndColumns']) {
+ $db = isset($_POST['db']) ? $_POST['db'] : $GLOBALS['db'];
+ $sql_autocomplete = array();
+ if ($db) {
+ $tableNames = $GLOBALS['dbi']->getTables($db);
+ foreach ($tableNames as $tableName) {
+ $sql_autocomplete[$tableName] = $GLOBALS['dbi']->getColumns(
+ $db, $tableName
+ );
+ }
}
+} else {
+ $sql_autocomplete = true;
}
-
$response = PMA_Response::getInstance();
$response->addJSON("tables", json_encode($sql_autocomplete));
diff --git a/doc/config.rst b/doc/config.rst
index 237df7f45a..a9a1c483b3 100644
--- a/doc/config.rst
+++ b/doc/config.rst
@@ -2435,6 +2435,14 @@ Text fields
Defines if the whole textarea of the query box will be selected on
click.
+.. config:option:: $cfg['EnableAutocompleteForTablesAndColumns']
+
+ :type: boolean
+ :default: true
+
+ Whether to enable autocomplete for table and column names in any
+ SQL query box.
+
SQL query box settings
----------------------
diff --git a/js/functions.js b/js/functions.js
index 602cf218b0..4fc77e2a79 100644
--- a/js/functions.js
+++ b/js/functions.js
@@ -4300,6 +4300,35 @@ $(document).on("change", "input.checkall_box", function () {
.parents("tr").toggleClass("marked", is_checked);
});
+/**
+ * Watches checkboxes in a sub form to set the sub checkall box accordingly
+ */
+var sub_checkboxes_changed = function () {
+ var $form = $(this).parent().parent();
+ // total number of checkboxes in current sub form
+ var total_boxes = $form.find(checkboxes_sel).length;
+ // number of checkboxes checked in current sub form
+ var checked_boxes = $form.find(checkboxes_sel + ":checked").length;
+ var $checkall = $form.find("input.sub_checkall_box");
+ if (total_boxes == checked_boxes) {
+ $checkall.prop({checked: true, indeterminate: false});
+ }
+ else if (checked_boxes > 0) {
+ $checkall.prop({checked: true, indeterminate: true});
+ }
+ else {
+ $checkall.prop({checked: false, indeterminate: false});
+ }
+};
+$(document).on("change", checkboxes_sel + ", input.checkall_box:checkbox:enabled", sub_checkboxes_changed);
+
+$(document).on("change", "input.sub_checkall_box", function () {
+ var is_checked = $(this).is(":checked");
+ var $form = $(this).parent().parent();
+ $form.find(checkboxes_sel).prop("checked", is_checked)
+ .parents("tr").toggleClass("marked", is_checked);
+});
+
/**
* Toggles row colors of a set of 'tr' elements starting from a given element
*
diff --git a/libraries/central_columns.lib.php b/libraries/central_columns.lib.php
index fdd9dee67b..85ea78ee03 100644
--- a/libraries/central_columns.lib.php
+++ b/libraries/central_columns.lib.php
@@ -1006,7 +1006,7 @@ function PMA_getHTMLforCentralColumnsEditTableRow($row, $odd_row, $row_num)
'
'
. PMA_getHtmlForColumnNull($row_num, 6, 0, array('Null'=>$row['col_isNull']))
. ' | ';
- $extra_val = $row['col_extra'];
+
$tableHtml .=
''
. PMA_getHtmlForColumnExtra(
diff --git a/libraries/config.default.php b/libraries/config.default.php
index e2db43abde..7380fc53c2 100644
--- a/libraries/config.default.php
+++ b/libraries/config.default.php
@@ -2875,6 +2875,13 @@ $cfg['SQLQuery']['ShowAsPHP'] = true;
*/
$cfg['SQLQuery']['Refresh'] = true;
+/**
+ * Enables autoComplete for table & column names in SQL queries
+ *
+ * default = 'true'
+ */
+$cfg['EnableAutocompleteForTablesAndColumns'] = true;
+
/*******************************************************************************
* Web server upload/save/import directories
diff --git a/libraries/config/messages.inc.php b/libraries/config/messages.inc.php
index 4b04dc5bc4..9d7115ed55 100644
--- a/libraries/config/messages.inc.php
+++ b/libraries/config/messages.inc.php
@@ -91,6 +91,8 @@ $strConfigDefaultTabServer_desc = __('Tab that is displayed when entering a serv
$strConfigDefaultTabServer_name = __('Default server tab');
$strConfigDefaultTabTable_desc = __('Tab that is displayed when entering a table.');
$strConfigDefaultTabTable_name = __('Default table tab');
+$strConfigEnableAutocompleteForTablesAndColumns_desc = __('Autocomplete of the table and column names in the SQL queries.');
+$strConfigEnableAutocompleteForTablesAndColumns_name = __('Enable autocomplete for table and column names');
$strConfigHideStructureActions_desc
= __('Whether the table structure actions should be hidden.');
$strConfigHideStructureActions_name = __('Hide table structure actions');
diff --git a/libraries/config/setup.forms.php b/libraries/config/setup.forms.php
index 34b1180d38..ead911d790 100644
--- a/libraries/config/setup.forms.php
+++ b/libraries/config/setup.forms.php
@@ -159,7 +159,8 @@ $forms['Sql_queries']['Sql_queries'] = array(
'IgnoreMultiSubmitErrors',
'MaxCharactersInDisplayedSQL',
'RetainQueryBox',
- 'CodemirrorEnable');
+ 'CodemirrorEnable',
+ 'EnableAutocompleteForTablesAndColumns');
$forms['Sql_queries']['Sql_box'] = array('SQLQuery' => array(
'Edit',
'Explain',
diff --git a/libraries/config/user_preferences.forms.php b/libraries/config/user_preferences.forms.php
index f6b63a92fb..56b5118015 100644
--- a/libraries/config/user_preferences.forms.php
+++ b/libraries/config/user_preferences.forms.php
@@ -68,7 +68,8 @@ $forms['Sql_queries']['Sql_queries'] = array(
'IgnoreMultiSubmitErrors',
'MaxCharactersInDisplayedSQL',
'RetainQueryBox',
- 'CodemirrorEnable');
+ 'CodemirrorEnable',
+ 'EnableAutocompleteForTablesAndColumns');
$forms['Sql_queries']['Sql_box'] = array(
'SQLQuery/Edit',
'SQLQuery/Explain',
diff --git a/libraries/server_privileges.lib.php b/libraries/server_privileges.lib.php
index 8669c11013..843eb6412f 100644
--- a/libraries/server_privileges.lib.php
+++ b/libraries/server_privileges.lib.php
@@ -1403,7 +1403,13 @@ function PMA_getHtmlForGlobalPrivTableWithCheckboxes(
$html_output = '';
foreach ($privTable as $i => $table) {
$html_output .= ' |