Merge branch 'QA_5_0'

Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
This commit is contained in:
Maurício Meneghini Fauth 2020-04-26 18:29:39 -03:00
commit b0a728fea6
6 changed files with 80 additions and 65 deletions

View File

@ -47,6 +47,7 @@ phpMyAdmin - ChangeLog
- issue #16041 Fix IN(...) clause doesn't permit multiple values on "Search" page
- issue #14411 Support double tap to edit on mobile
- issue #16043 Fix php error "Use of undefined constant MYSQLI_TYPE_JSON" when using the mysqlnd extension
- issue #14611 Fix fatal JS error on index creation after using Enter key to submit the form
5.0.2 (2020-03-20)
- issue Fixed deprecation warning "implode(): Passing glue string after array is deprecated." function on export page

View File

@ -3775,33 +3775,36 @@ AJAX.registerOnload('functions.js', function () {
*/
$(document).on('click', '#index_frm input[type=submit]', function (event) {
event.preventDefault();
var rowsToAdd = $(this)
.closest('fieldset')
.find('.slider')
.slider('value');
var hadAddButtonHidden = $(this).closest('fieldset').find('.add_fields').hasClass('hide');
if (hadAddButtonHidden === false) {
var rowsToAdd = $(this)
.closest('fieldset')
.find('.slider')
.slider('value');
var tempEmptyVal = function () {
$(this).val('');
};
var tempEmptyVal = function () {
$(this).val('');
};
var tempSetFocus = function () {
if ($(this).find('option:selected').val() === '') {
return true;
var tempSetFocus = function () {
if ($(this).find('option:selected').val() === '') {
return true;
}
$(this).closest('tr').find('input').trigger('focus');
};
while (rowsToAdd--) {
var $indexColumns = $('#index_columns');
var $newrow = $indexColumns
.find('tbody > tr').first()
.clone()
.appendTo(
$indexColumns.find('tbody')
);
$newrow.find(':input').each(tempEmptyVal);
// focus index size input on column picked
$newrow.find('select').on('change', tempSetFocus);
}
$(this).closest('tr').find('input').trigger('focus');
};
while (rowsToAdd--) {
var $indexColumns = $('#index_columns');
var $newrow = $indexColumns
.find('tbody > tr').first()
.clone()
.appendTo(
$indexColumns.find('tbody')
);
$newrow.find(':input').each(tempEmptyVal);
// focus index size input on column picked
$newrow.find('select').on('change', tempSetFocus);
}
});
});

View File

@ -358,7 +358,7 @@ Indexes.showAddIndexDialog = function (sourceArray, arrayIndex, targetColumns, c
return false;
}
$(this).dialog('close');
$(this).remove();
};
buttonOptions[Messages.strCancel] = function () {
if (colIndex >= 0) {
@ -393,6 +393,15 @@ Indexes.showAddIndexDialog = function (sourceArray, arrayIndex, targetColumns, c
title: Messages.strAddIndex,
width: 450,
minHeight: 250,
create: function () {
$(this).on('keypress', function (e) {
if (e.which === 13 || e.keyCode === 13 || window.event.keyCode === 13) {
e.preventDefault();
buttonOptions[Messages.strGo]();
$(this).remove();
}
});
},
open: function () {
Functions.checkIndexName('index_frm');
Functions.showHints($div);

View File

@ -69,11 +69,13 @@ class ImportStatusController
}
}
echo $_SESSION['Import_message']['message'];
echo $_SESSION['Import_message']['message'] ?? '';
echo $this->template->render('import_status', [
'go_back_url' => $_SESSION['Import_message']['go_back_url'],
]);
if (isset($_SESSION['Import_message']['go_back_url'])) {
echo $this->template->render('import_status', [
'go_back_url' => $_SESSION['Import_message']['go_back_url'],
]);
}
} else {
ImportAjax::status($_GET['id']);
}

View File

@ -848,9 +848,9 @@ class TransformationPluginsTest extends PmaTestCase
[
12345,
[0],
(object) [
((object) [
'type' => 'int',
],
]),
],
'<dfn onclick="alert(\'12345\');" title="12345">'
. 'Jan 01, 1970 at 03:25 AM</dfn>',
@ -860,9 +860,9 @@ class TransformationPluginsTest extends PmaTestCase
[
12345678,
[0],
(object) [
((object) [
'type' => 'string',
],
]),
],
'<dfn onclick="alert(\'12345678\');" title="12345678">'
. 'May 23, 1970 at 09:21 PM</dfn>',
@ -872,9 +872,9 @@ class TransformationPluginsTest extends PmaTestCase
[
123456789,
[0],
(object) [
((object) [
'type' => null,
],
]),
],
'<dfn onclick="alert(\'123456789\');" title="123456789">'
. 'Nov 29, 1973 at 09:33 PM</dfn>',
@ -884,9 +884,9 @@ class TransformationPluginsTest extends PmaTestCase
[
'20100201',
[0],
(object) [
((object) [
'type' => null,
],
]),
],
'<dfn onclick="alert(\'20100201\');" title="20100201">'
. 'Feb 01, 2010 at 12:00 AM</dfn>',

View File

@ -321,18 +321,18 @@ class VersionInformationTest extends PmaTestCase
return [
[
[
(object) [
((object) [
'date' => '2019-12-26',
'php_versions' => '>=5.5,<8.0',
'version' => '4.9.3',
'mysql_versions' => '>=5.5',
],
(object) [
]),
((object) [
'date' => '2019-12-26',
'php_versions' => '>=7.1,<8.0',
'version' => '5.0.0',
'mysql_versions' => '>=5.5',
],
]),
],
[
[
@ -356,18 +356,18 @@ class VersionInformationTest extends PmaTestCase
],
[
[
(object) [
((object) [
'date' => '2019-12-26',
'php_versions' => '>=5.5,<7.0',
'version' => '6.0.0',
'mysql_versions' => '>=5.5',
],
(object) [
]),
((object) [
'date' => '2019-12-26',
'php_versions' => '>=7.1,<8.0',
'version' => '5.0.0',
'mysql_versions' => '>=5.5',
],
]),
],
[
[
@ -387,18 +387,18 @@ class VersionInformationTest extends PmaTestCase
],
[
[
(object) [
((object) [
'date' => '2019-12-26',
'php_versions' => '>=5.5,<7.0',
'version' => '6.0.0-rc1',
'mysql_versions' => '>=5.5',
],
(object) [
]),
((object) [
'date' => '2019-12-26',
'php_versions' => '>=7.1,<8.0',
'version' => '6.0.0-rc2',
'mysql_versions' => '>=5.5',
],
]),
],
[
[
@ -418,18 +418,18 @@ class VersionInformationTest extends PmaTestCase
],
[
[
(object) [
((object) [
'date' => '2019-12-26',
'php_versions' => '>=5.5,<7.0',
'version' => '6.0.0',
'mysql_versions' => '>=5.5',
],
(object) [
]),
((object) [
'date' => '2019-12-26',
'php_versions' => '>=7.1,<8.0',
'version' => '5.0.0',
'mysql_versions' => '>=5.5',
],
]),
],
[
[
@ -449,18 +449,18 @@ class VersionInformationTest extends PmaTestCase
],
[
[
(object) [
((object) [
'date' => '2019-12-26',
'php_versions' => '>=5.5,<7.0',
'version' => '6.0.0',
'mysql_versions' => '>=5.5',
],
(object) [
]),
((object) [
'date' => '2019-12-26',
'php_versions' => '>=7.1,<8.0',
'version' => '5.0.0',
'mysql_versions' => '>=5.5',
],
]),
],
[
[
@ -480,18 +480,18 @@ class VersionInformationTest extends PmaTestCase
],
[
[
(object) [
((object) [
'date' => '2019-12-26',
'php_versions' => '>=5.5,<8.0',
'version' => '4.9.3',
'mysql_versions' => '>=5.5',
],
(object) [
]),
((object) [
'date' => '2019-12-26',
'php_versions' => '>=7.1,<8.0',
'version' => '5.0.0',
'mysql_versions' => '>=5.5',
],
]),
],
[
[
@ -515,18 +515,18 @@ class VersionInformationTest extends PmaTestCase
],
[
[
(object) [
((object) [
'date' => '2019-12-26',
'php_versions' => '>=7.1,<8.0',
'version' => '5.0.0',
'mysql_versions' => '>=5.5',
],
(object) [
]),
((object) [
'date' => '2019-12-26',
'php_versions' => '>=5.5,<8.0',
'version' => '4.9.3',
'mysql_versions' => '>=5.5',
],
]),
],
[
[