diff --git a/ChangeLog b/ChangeLog index eabd055b9a..8dedbc575d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -54,6 +54,7 @@ phpMyAdmin - ChangeLog + rfe #1634 Don't group tables in tree if the result has only one group - bug #4946 When hide table structure actions is false, action should be in a row + rfe #726 Batch changing the collation of each column in a table ++ rfe #1594 Use plain English descriptors instead of script names for icon link destinations 4.4.10.0 (not yet released) - bug #4950 Issues in database selection for replication diff --git a/doc/config.rst b/doc/config.rst index 2537981489..b65799bb01 100644 --- a/doc/config.rst +++ b/doc/config.rst @@ -1598,16 +1598,16 @@ Navigation panel setup .. config:option:: $cfg['NavigationTreeDefaultTabTable'] :type: string - :default: ``'tbl_structure.php'`` + :default: ``'structure'`` Defines the tab displayed by default when clicking the small icon next to each table name in the navigation panel. Possible values: - * ``tbl_structure.php`` - * ``tbl_sql.php`` - * ``tbl_select.php`` - * ``tbl_change.php`` - * ``sql.php`` + * ``structure`` + * ``sql`` + * ``search`` + * ``insert`` + * ``browse`` .. config:option:: $cfg['NavigationTreeDefaultTabTable2'] @@ -1618,11 +1618,11 @@ Navigation panel setup to each table name in the navigation panel. Possible values: * ``(empty)`` - * ``tbl_structure.php`` - * ``tbl_sql.php`` - * ``tbl_select.php`` - * ``tbl_change.php`` - * ``sql.php`` + * ``structure`` + * ``sql`` + * ``search`` + * ``insert`` + * ``browse`` .. config:option:: $cfg['NavigationTreeEnableExpansion'] @@ -1957,40 +1957,41 @@ Tabs display settings .. config:option:: $cfg['DefaultTabServer'] :type: string - :default: ``'index.php'`` + :default: ``'welcome'`` Defines the tab displayed by default on server view. Possible values: - * ``main.php`` (recommended for multi-user setups) - * ``server_databases.php``, - * ``server_status.php`` - * ``server_variables.php`` - * ``server_privileges.php`` + * ``welcome`` (recommended for multi-user setups) + * ``databases``, + * ``status`` + * ``variables`` + * ``privileges`` .. config:option:: $cfg['DefaultTabDatabase'] :type: string - :default: ``'db_structure.php'`` + :default: ``'structure'`` Defines the tab displayed by default on database view. Possible values: - * ``db_structure.php`` - * ``db_sql.php`` - * ``db_search.php``. + * ``structure`` + * ``sql`` + * ``search`` + * ``operations`` .. config:option:: $cfg['DefaultTabTable'] :type: string - :default: ``'sql.php'`` + :default: ``'browse'`` Defines the tab displayed by default on table view. Possible values: - * ``tbl_structure.php`` - * ``tbl_sql.php`` - * ``tbl_select.php`` - * ``tbl_change.php`` - * ``sql.php`` + * ``structure`` + * ``sql`` + * ``search`` + * ``insert`` + * ``browse`` PDF Options ----------- diff --git a/index.php b/index.php index bb4e12742a..5d27ef28c6 100644 --- a/index.php +++ b/index.php @@ -61,9 +61,13 @@ if (isset($_REQUEST['ajax_request']) && ! empty($_REQUEST['access_time'])) { if (! empty($_REQUEST['db'])) { $page = null; if (! empty($_REQUEST['table'])) { - $page = $GLOBALS['cfg']['DefaultTabTable']; + $page = PMA_Util::getScriptNameForOption( + $GLOBALS['cfg']['DefaultTabTable'], 'table' + ); } else { - $page = $GLOBALS['cfg']['DefaultTabDatabase']; + $page = PMA_Util::getScriptNameForOption( + $GLOBALS['cfg']['DefaultTabDatabase'], 'database' + ); } include $page; exit; diff --git a/js/db_structure.js b/js/db_structure.js index b48094266d..656b6a70a2 100644 --- a/js/db_structure.js +++ b/js/db_structure.js @@ -243,14 +243,21 @@ AJAX.registerOnload('db_structure.js', function () { /** * @var question String containing the question to be asked for confirmation */ - var question = PMA_messages.strTruncateTableStrongWarning + ' ' + - PMA_sprintf(PMA_messages.strDoYouReally, 'TRUNCATE ' + escapeHtml(curr_table_name)); + var question = PMA_messages.strTruncateTableStrongWarning + ' ' + + PMA_sprintf(PMA_messages.strDoYouReally, 'TRUNCATE ' + escapeHtml(curr_table_name)) + + getForeignKeyCheckbox(); $this_anchor.PMA_confirm(question, $this_anchor.attr('href'), function (url) { PMA_ajaxShowMessage(PMA_messages.strProcessingRequest); - $.get(url, {'is_js_confirmed' : 1, 'ajax_request' : true}, function (data) { + var params = { + 'is_js_confirmed' : 1, + 'ajax_request' : true, + 'fk_checks': $(this).find('#fk_checks').is(':checked') ? 1 : 0 + }; + + $.get(url, params, function (data) { if (typeof data !== 'undefined' && data.success === true) { PMA_ajaxShowMessage(data.message); // Adjust table statistics @@ -305,12 +312,19 @@ AJAX.registerOnload('db_structure.js', function () { question = PMA_sprintf(PMA_messages.strDoYouReally, 'DROP VIEW ' + escapeHtml(curr_table_name)); } + question += getForeignKeyCheckbox(); $this_anchor.PMA_confirm(question, $this_anchor.attr('href'), function (url) { var $msg = PMA_ajaxShowMessage(PMA_messages.strProcessingRequest); - $.get(url, {'is_js_confirmed' : 1, 'ajax_request' : true}, function (data) { + var params = { + 'is_js_confirmed' : 1, + 'ajax_request' : true, + 'fk_checks': $(this).find('#fk_checks').is(':checked') ? 1 : 0 + }; + + $.get(url, params, function (data) { if (typeof data !== 'undefined' && data.success === true) { PMA_ajaxShowMessage(data.message); toggleRowColors($curr_row.next()); diff --git a/js/functions.js b/js/functions.js index baa164f59d..0d34dbae40 100644 --- a/js/functions.js +++ b/js/functions.js @@ -1675,6 +1675,23 @@ function pdfPaperSize(format, axis) return 0; } +/** + * Get checkbox for foreign key checks + * + * @return string + */ +function getForeignKeyCheckbox() { + default_fk_check_value = PMA_commonParams.get('default_fk_check_value'); + var html = ""; + html += "