Merge branch 'QA_5_1'

Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
This commit is contained in:
Maurício Meneghini Fauth 2021-09-05 00:51:20 -03:00
commit 322dc72621
No known key found for this signature in database
GPG Key ID: 6A16FD38AFC89CC8
4 changed files with 27 additions and 3 deletions

View File

@ -126,6 +126,8 @@ phpMyAdmin - ChangeLog
- issue #16906 Create the phpMyAdmin storage database using the configured "['pmadb']" name and not always "phpmyadmin"
- issue #16906 Prevent incorrect overriding of configured values after a pmadb fix
- issue #16906 Use the control connection to create the storage database and tables and not the user connection
- issue #16693 Fix can't see SQL after adding a new column
- issue #12753 Show table structure after adding a new column
5.1.1 (2021-06-04)
- issue #13325 Fixed created procedure shows up in triggers and events and vice-versa

View File

@ -91,7 +91,7 @@
"php-webdriver/webdriver": "^1.11",
"phpmyadmin/coding-standard": "^3.0.0",
"phpstan/extension-installer": "^1.1",
"phpstan/phpstan": "^0.12.93",
"phpstan/phpstan": "^0.12.98",
"phpstan/phpstan-phpunit": "^0.12.17",
"phpstan/phpstan-webmozart-assert": "^0.12.12",
"phpunit/phpunit": "^8.5 || ^9.5",

View File

@ -91,11 +91,23 @@ AJAX.registerOnload('table/structure.js', function () {
.show();
Functions.highlightSql($('#page_content'));
$('.result_query .alert-primary').remove();
reloadFieldForm();
if (typeof data.structure_refresh_route !== 'string') {
// Do not reload the form when the code below freshly filled it
reloadFieldForm();
}
$form.remove();
Functions.ajaxRemoveMessage($msg);
Navigation.reload();
CommonActions.refreshMain('index.php?route=/table/structure');
if (typeof data.structure_refresh_route === 'string') {
// Fetch the table structure right after adding a new column
$.get(data.structure_refresh_route, function (data) {
if (typeof data.success !== 'undefined' && data.success === true) {
$('#page_content').append(data.message).show();
}
});
} else {
CommonActions.refreshMain('index.php?route=/table/structure');
}
} else {
Functions.ajaxShowMessage(data.error, false);
}

View File

@ -175,6 +175,16 @@ class AddFieldController extends AbstractController
Generator::getMessage($message, $sql_query, 'success')
);
// Give an URL to call and use to appends the structure after the success message
$this->response->addJSON(
'structure_refresh_route',
Url::getFromRoute('/table/structure', [
'db' => $db,
'table' => $table,
'ajax_request' => '1',
])
);
return;
}