Merge remote-tracking branch 'security/security/279' into QA_4_9

This commit is contained in:
Isaac Bennetch 2019-09-20 17:42:30 -04:00
commit 0de99c89e1
2 changed files with 8 additions and 14 deletions

View File

@ -86,7 +86,7 @@ class ServerDatabasesController extends Controller
$scripts->addFile('server_databases.js');
$this->_setSortDetails();
$this->_dbstats = empty($_REQUEST['dbstats']) ? false : true;
$this->_dbstats = ! empty($_POST['dbstats']);
$this->_pos = empty($_REQUEST['pos']) ? 0 : (int) $_REQUEST['pos'];
/**

View File

@ -63,19 +63,13 @@
{# Enable statistics #}
{% if dbstats is empty %}
{{ Message_notice('Note: Enabling the database statistics here might cause heavy traffic between the web server and the MySQL server.'|trans) }}
{% set content %}
<strong>{% trans 'Enable statistics' %}</strong>
{% endset %}
{% set items = [{
'content': content,
'class': 'li_switch_dbstats',
'url': {
'href': 'server_databases.php' ~ Url_getCommon({'dbstats': '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="{{ Url_getCommon({'dbstats': '1'}, '') }}" title="{% trans 'Enable statistics' %}">
<strong>{% trans 'Enable statistics' %}</strong>
</a>
</li>
</ul>
{% endif %}
</form>
</div>