Skip to content

Commit

Permalink
Merge branch 'QA_4_9' into QA_5_0
Browse files Browse the repository at this point in the history
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
  • Loading branch information
MauricioFauth committed Sep 21, 2019
2 parents 725f407 + 806a880 commit 08696bc
Show file tree
Hide file tree
Showing 6 changed files with 26 additions and 16 deletions.
6 changes: 5 additions & 1 deletion ChangeLog
Expand Up @@ -40,7 +40,9 @@ phpMyAdmin - ChangeLog
- issue #15350 Change MIME type references to Media (MIME) type
- issue Fixed url.php crashing because it's not loading the DatabaseInterface service

4.9.1 (not yet released)
4.9.2 (not yet released)

4.9.1 (2019-09-20)
- issue #15313 Added support for Twig 2
- issue #15315 Fix cannot edit or export column with default CURRENT_TIMESTAMP in MySQL >= 8.0.13
- issue Fix a TypeError in Import class with PHP 8
Expand Down Expand Up @@ -77,6 +79,8 @@ phpMyAdmin - ChangeLog
- issue #15440 Fix page number is not being updated in the URL after saving a designer's page
- issue Fix reloading a designer's page
- issue Fix designer full screen mode button and text stuck when exiting full-screen mode
- issue Reduced possibility of causing heavy server traffic between the database and web servers
- issue Fix a situation where a server could be deleted while an administator is using the setup script

4.9.0.1 (2019-06-04)
- issue #14478 phpMyAdmin no longer streams the export data
Expand Down
10 changes: 10 additions & 0 deletions js/setup/scripts.js
Expand Up @@ -218,3 +218,13 @@ $(function () {
//
// END: User preferences allow/disallow UI
// ------------------------------------------------------------------

$(function () {
$('.delete-server').on('click', function (e) {
e.preventDefault();
var $this = $(this);
$.post($this.attr('href'), $this.attr('data-post'), function () {
window.location.replace('index.php');
});
});
});
1 change: 1 addition & 0 deletions libraries/classes/Controllers/Setup/HomeController.php
Expand Up @@ -141,6 +141,7 @@ public function index(array $params): string
'auth_type' => $this->config->getValue("Servers/$id/auth_type"),
'dsn' => $this->config->getServerDSN($id),
'params' => [
'token' => $_SESSION[' PMA_token '],
'edit' => [
'page' => 'servers',
'mode' => 'edit',
Expand Down
2 changes: 1 addition & 1 deletion setup/index.php
Expand Up @@ -49,7 +49,7 @@
]);
} elseif ($page === 'servers') {
$controller = new ServersController($GLOBALS['ConfigFile'], new Template());
if (isset($_GET['mode']) && $_GET['mode'] === 'remove') {
if (isset($_GET['mode']) && $_GET['mode'] === 'remove' && $_SERVER['REQUEST_METHOD'] == 'POST') {
$controller->destroy([
'id' => $_GET['id'] ?? null,
]);
Expand Down
20 changes: 7 additions & 13 deletions templates/server/databases/index.twig
Expand Up @@ -308,19 +308,13 @@
{# Enable statistics #}
{% if not has_statistics %}
{{ 'Note: Enabling the database statistics here might cause heavy traffic between the web server and the MySQL server.'|trans|notice }}

{% set content %}
<strong>{% trans 'Enable statistics' %}</strong>
{% endset %}
{% set items = [{
'content': content,
'class': 'li_switch_dbstats',
'url': {
'href': 'server_databases.php' ~ get_common({'statistics': '1'}),
'title': 'Enable statistics'|trans
}
}] %}
{% include 'list/unordered.twig' with {'items': items} only %}
<ul>
<li class="li_switch_dbstats">
<a href="server_databases.php" data-post="{{ get_common({'statistics': '1'}, '') }}" title="{% trans 'Enable statistics' %}">
<strong>{% trans 'Enable statistics' %}</strong>
</a>
</li>
</ul>
{% endif %}
</form>
</div>
Expand Down
3 changes: 2 additions & 1 deletion templates/setup/home/index.twig
Expand Up @@ -57,7 +57,8 @@
{% trans 'Edit' %}
</a>
|
<a href="{{ get_common(server.params.remove) }}">
<a class="delete-server" href="{{ get_common(server.params.remove) }}" data-post="
{{- get_common(server.params.token, '') }}">
{% trans 'Delete' %}
</a>
</small>
Expand Down

0 comments on commit 08696bc

Please sign in to comment.