Skip to content

Commit

Permalink
Merge branch 'master' into issue-15792
Browse files Browse the repository at this point in the history
  • Loading branch information
yashrajbothra committed Jan 19, 2020
2 parents 9888c50 + ae0577a commit cd2079f
Show file tree
Hide file tree
Showing 83 changed files with 977 additions and 1,150 deletions.
2 changes: 2 additions & 0 deletions .travis.yml
Expand Up @@ -54,6 +54,7 @@ jobs:
include:
- stage: "Lint and analyse code"
name: "Lint files"
before_install: phpenv config-rm xdebug.ini
before_script: skip
after_script: skip
after_success: skip
Expand All @@ -65,6 +66,7 @@ jobs:

- stage: "Lint and analyse code"
name: "Run phpstan"
before_install: phpenv config-rm xdebug.ini
before_script: skip
after_script: skip
after_success: skip
Expand Down
10 changes: 10 additions & 0 deletions ChangeLog
Expand Up @@ -9,6 +9,8 @@ phpMyAdmin - ChangeLog
- issue #15491 Improve complexity of generated passwords
- issue #14909 Add a configuration option to define the 1st day of week
- issue #12726 Made user names clickable in user accounts overview
- issue #15729 Improve virtuality dropdown for MariaDB > 10.1
- issue #15312 Added an option to perform ALTER ONLINE (ALGORITHM=INPLACE) when editing a table structure

5.0.2 (not yet released)
- issue Fixed deprecation warning "implode(): Passing glue string after array is deprecated." function on export page
Expand All @@ -22,6 +24,14 @@ phpMyAdmin - ChangeLog
- issue Fixed wrong jQuery function call in table search page
- issue #15761 Fix uncaught TypeError when using "$cfg['ServerDefault'] = 0;"
- issue #15780 Fixed unexpected UI of action links (text only mode)
- issue #15674 Replace twig/extensions with phpmyadmin/twig-i18n-extension
- issue #15799 Change location of profiling state documentation to fix column ordering
- issue #15720 Fix designer adding all available tables to a designer page after adding a new relationship
- issue #15791 Replace facebook/webdriver by php-webdriver/webdriver
- issue #15802 Removed SET AUTOCOMMIT=0 from SQL export
- issue #15818 Fix table borders missing on theme original since 5.0.0
- issue #13864 Fix ENUM's radiobuttons reset on "Continue insertion with" changes
- issue #15811 Fixed browse foreign values doesn't show a modal with grid edit

5.0.1 (2020-01-07)
- issue #15719 Fixed error 500 when browsing a table when $cfg['LimitChars'] used a string and not an int value
Expand Down
4 changes: 2 additions & 2 deletions composer.json
Expand Up @@ -50,14 +50,14 @@
"phpmyadmin/motranslator": "^4.0",
"phpmyadmin/shapefile": "^2.0",
"phpmyadmin/sql-parser": "^5.0",
"phpmyadmin/twig-i18n-extension": "^2.0",
"phpseclib/phpseclib": "^2.0",
"symfony/config": "^4.2.8",
"symfony/dependency-injection": "^4.2.8",
"symfony/expression-language": "^4.2",
"symfony/polyfill-ctype": "^1.8",
"symfony/polyfill-mbstring": "^1.3",
"symfony/yaml": "^4.2.8",
"twig/extensions": "~1.5.1",
"twig/twig": "^2.4",
"williamdes/mariadb-mysql-kbs": "^1.2"
},
Expand All @@ -83,7 +83,7 @@
},
"require-dev": {
"codacy/coverage": "^1.3.0",
"facebook/webdriver": "^1.7.1",
"php-webdriver/webdriver": "^1.7.1",
"phpmyadmin/coding-standard": "^1.0",
"phpstan/extension-installer": "^1.0",
"phpstan/phpstan": "^0.11.19",
Expand Down
2 changes: 1 addition & 1 deletion doc/config.rst
Expand Up @@ -9,7 +9,7 @@ All configurable data is placed in :file:`config.inc.php` in phpMyAdmin's
toplevel directory. If this file does not exist, please refer to the
:ref:`setup` section to create one. This file only needs to contain the
parameters you want to change from their corresponding default value in
:file:`libraries/config.default.php` (this file is not inteded for changes).
:file:`libraries/config.default.php` (this file is not intended for changes).

.. seealso::

Expand Down
11 changes: 8 additions & 3 deletions js/designer/move.js
Expand Up @@ -528,6 +528,8 @@ DesignerMove.addTableToTablesList = function (index, tableDom) {
var table = $(tableDom).find('.small_tab_pref').attr('table_name');
var dbEncoded = $(tableDom).find('.small_tab_pref').attr('db_url');
var tableEncoded = $(tableDom).find('.small_tab_pref').attr('table_name_url');
var tableIsChecked = $(tableDom).css('display') === 'block' ? 'checked' : '';
var checkboxStatus = (tableIsChecked === 'checked') ? Messages.strHide : Messages.strShow;
var $newTableLine = $('<tr>' +
' <td title="' + Messages.strStructure + '"' +
' width="1px"' +
Expand All @@ -540,12 +542,11 @@ DesignerMove.addTableToTablesList = function (index, tableDom) {
' </td>' +
' <td width="1px">' +
' <input class="scroll_tab_checkbox"' +
' title="' + Messages.strHide + '"' +
' title="' + checkboxStatus + '"' +
' id="check_vis_' + dbEncoded + '.' + tableEncoded + '"' +
' style="margin:0;"' +
' type="checkbox"' +
' value="' + dbEncoded + '.' + tableEncoded + '"' +
' checked="checked"' +
' value="' + dbEncoded + '.' + tableEncoded + '"' + tableIsChecked +
' />' +
' </td>' +
' <td class="designer_Tabs"' +
Expand All @@ -559,6 +560,9 @@ DesignerMove.addTableToTablesList = function (index, tableDom) {
DesignerMove.selectTab($(this).attr('designer_url_table_name'));
});
$($newTableLine).find('.scroll_tab_checkbox').on('click', function () {
$(this).attr('title', function (i, currentvalue) {
return currentvalue === Messages.strHide ? Messages.strShow : Messages.strHide;
});
DesignerMove.visibleTab(this,$(this).val());
});
var $tablesCounter = $('#tables_counter');
Expand Down Expand Up @@ -1589,6 +1593,7 @@ DesignerMove.visibleTab = function (id, tN) {
document.getElementById(tN).style.display = 'none';
}
DesignerMove.reload();
DesignerMove.markUnsaved();
};

// max/min all tables
Expand Down
4 changes: 2 additions & 2 deletions js/drag_drop_import.js
Expand Up @@ -15,11 +15,11 @@ var DragDropImport = {
*/
liveUploadCount: 0,
/**
* @var string array, allowed extensions
* @var string array, allowed extensions
*/
allowedExtensions: ['sql', 'xml', 'ldi', 'mediawiki', 'shp'],
/**
* @var string array, allowed extensions for compressed files
* @var string array, allowed extensions for compressed files
*/
allowedCompressedExtensions: ['gz', 'bz2', 'zip'],
/**
Expand Down
25 changes: 12 additions & 13 deletions js/functions.js
Expand Up @@ -589,7 +589,7 @@ Functions.parseVersionString = function (str) {
var min = parseInt(x[1], 10) || 0;
var pat = parseInt(x[2], 10) || 0;
var hotfix = parseInt(x[3], 10) || 0;
return maj * 100000000 + min * 1000000 + pat * 10000 + hotfix * 100 + add;
return maj * 100000000 + min * 1000000 + pat * 10000 + hotfix * 100 + add;
};

/**
Expand Down Expand Up @@ -1769,9 +1769,8 @@ Functions.loadForeignKeyCheckbox = function () {
var params = {
'ajax_request': true,
'server': CommonParams.get('server'),
'get_default_fk_check_value': true
};
$.get('index.php?route=/sql', params, function (data) {
$.get('index.php?route=/sql/get-default-fk-check-value', params, function (data) {
var html = '<input type="hidden" name="fk_checks" value="0">' +
'<input type="checkbox" name="fk_checks" id="fk_checks"' +
(data.default_fk_check_value ? ' checked="checked"' : '') + '>' +
Expand Down Expand Up @@ -2267,8 +2266,8 @@ Functions.ajaxShowMessage = function (message, timeout, type) {
// Remove all old messages, if any
$('span.ajax_notification[id^=ajax_message_num]').remove();
/**
* @var $retval a jQuery object containing the reference
* to the created AJAX message
* @var $retval a jQuery object containing the reference
* to the created AJAX message
*/
var $retval = $(
'<span class="ajax_notification" id="ajax_message_num_' +
Expand Down Expand Up @@ -3079,7 +3078,7 @@ AJAX.registerOnload('functions.js', function () {
*
* @see Messages.strPasswordEmpty
* @see Messages.strPasswordNotSame
* @param object $the_form The form to be validated
* @param {object} $theForm The form to be validated
* @return bool
*/
Functions.checkPassword = function ($theForm) {
Expand Down Expand Up @@ -3505,7 +3504,7 @@ AJAX.registerOnload('functions.js', function () {
'</fieldset>' +
'</div>';
/**
* @var Defines functions to be called when the buttons in
* @var {object} buttonOptions Defines functions to be called when the buttons in
* the buttonOptions jQuery dialog bar are pressed
*/
var buttonOptions = {};
Expand Down Expand Up @@ -3812,7 +3811,7 @@ Functions.indexEditorDialog = function (url, title, callbackSuccess, callbackFai
var buttonOptions = {};
buttonOptions[Messages.strGo] = function () {
/**
* @var the_form object referring to the export form
* @var the_form object referring to the export form
*/
var $form = $('#index_frm');
Functions.ajaxShowMessage(Messages.strProcessingRequest);
Expand Down Expand Up @@ -5086,8 +5085,8 @@ Functions.getImage = function (image, alternate, attributes) {
* NOTE: Depending on server's configuration, the configuration table may be or
* not persistent.
*
* @param {string} key Configuration key.
* @param {object} value Configuration value.
* @param {string} key Configuration key.
* @param {object} value Configuration value.
*/
Functions.configSet = function (key, value) {
var serialized = JSON.stringify(value);
Expand Down Expand Up @@ -5124,10 +5123,10 @@ Functions.configSet = function (key, value) {
* If value should not be cached and the up-to-date configuration value from
* right from the server is required, the third parameter should be `false`.
*
* @param {string} key Configuration key.
* @param {boolean} cached Configuration type.
* @param {string} key Configuration key.
* @param {boolean} cached Configuration type.
*
* @return {object} Configuration value.
* @return {object} Configuration value.
*/
Functions.configGet = function (key, cached) {
var isCached = (typeof cached !== 'undefined') ? cached : true;
Expand Down
4 changes: 2 additions & 2 deletions js/indexes.js
Expand Up @@ -624,9 +624,9 @@ AJAX.registerOnload('indexes.js', function () {
* @var $currRow Object containing reference to the current field's row
*/
var $currRow = $anchor.parents('tr');
/** @var Number of columns in the key */
/** @var {number} rows Number of columns in the key */
var rows = $anchor.parents('td').attr('rowspan') || 1;
/** @var Rows that should be hidden */
/** @var {number} $rowsToHide Rows that should be hidden */
var $rowsToHide = $currRow;
for (var i = 1, $lastRow = $currRow.next(); i < rows; i++, $lastRow = $lastRow.next()) {
$rowsToHide = $rowsToHide.add($lastRow);
Expand Down
13 changes: 4 additions & 9 deletions js/makegrid.js
Expand Up @@ -384,7 +384,6 @@ var makeGrid = function (t, enableResize, enableReorder, enableVisib, enableGrid
'table': g.table,
'token': g.token,
'server': g.server,
'set_col_prefs': true,
'table_create_time': g.tableCreateTime
};
if (g.colOrder.length > 0) {
Expand All @@ -393,7 +392,7 @@ var makeGrid = function (t, enableResize, enableReorder, enableVisib, enableGrid
if (g.colVisib.length > 0) {
$.extend(postParams, { 'col_visib': g.colVisib.toString() });
}
$.post('index.php?route=/sql', postParams, function (data) {
$.post('index.php?route=/sql/set-column-preferences', postParams, function (data) {
if (data.success !== true) {
var $tempDiv = $(document.createElement('div'));
$tempDiv.html(data.error);
Expand Down Expand Up @@ -881,7 +880,6 @@ var makeGrid = function (t, enableResize, enableReorder, enableVisib, enableGrid
*/
postParams = {
'ajax_request' : true,
'get_relational_values' : true,
'server' : g.server,
'db' : g.db,
'table' : g.table,
Expand All @@ -890,7 +888,7 @@ var makeGrid = function (t, enableResize, enableReorder, enableVisib, enableGrid
'relation_key_or_display_column' : relationKeyOrDisplayColumn
};

g.lastXHR = $.post('index.php?route=/sql', postParams, function (data) {
g.lastXHR = $.post('index.php?route=/sql/get-relational-values', postParams, function (data) {
g.lastXHR = null;
$editArea.removeClass('edit_area_loading');
if ($(data.dropdown).is('select')) {
Expand Down Expand Up @@ -927,14 +925,13 @@ var makeGrid = function (t, enableResize, enableReorder, enableVisib, enableGrid
*/
postParams = {
'ajax_request' : true,
'get_enum_values' : true,
'server' : g.server,
'db' : g.db,
'table' : g.table,
'column' : fieldName,
'curr_value' : currValue
};
g.lastXHR = $.post('index.php?route=/sql', postParams, function (data) {
g.lastXHR = $.post('index.php?route=/sql/get-enum-values', postParams, function (data) {
g.lastXHR = null;
$editArea.removeClass('edit_area_loading');
$editArea.append(data.dropdown);
Expand All @@ -953,7 +950,6 @@ var makeGrid = function (t, enableResize, enableReorder, enableVisib, enableGrid
if ($td.is('.truncated')) {
postParams = {
'ajax_request': true,
'get_set_values': true,
'server': g.server,
'db': g.db,
'table': g.table,
Expand All @@ -965,7 +961,6 @@ var makeGrid = function (t, enableResize, enableReorder, enableVisib, enableGrid
} else {
postParams = {
'ajax_request': true,
'get_set_values': true,
'server': g.server,
'db': g.db,
'table': g.table,
Expand All @@ -974,7 +969,7 @@ var makeGrid = function (t, enableResize, enableReorder, enableVisib, enableGrid
};
}

g.lastXHR = $.post('index.php?route=/sql', postParams, function (data) {
g.lastXHR = $.post('index.php?route=/sql/get-set-values', postParams, function (data) {
g.lastXHR = null;
$editArea.removeClass('edit_area_loading');
$editArea.append(data.select);
Expand Down

0 comments on commit cd2079f

Please sign in to comment.