Use the router for the server status variables page
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
This commit is contained in:
parent
31db3b7e42
commit
59f411639f
@ -121,6 +121,9 @@ if (isset($_GET['route']) || isset($_POST['route'])) {
|
||||
$routes->addRoute('GET', '/queries', function () {
|
||||
require_once ROOT_PATH . 'libraries/entry_points/server/status/queries.php';
|
||||
});
|
||||
$routes->addRoute(['GET', 'POST'], '/variables', function () {
|
||||
require_once ROOT_PATH . 'libraries/entry_points/server/status/variables.php';
|
||||
});
|
||||
});
|
||||
$routes->addRoute(['GET', 'POST'], '/variables', function () {
|
||||
require_once ROOT_PATH . 'libraries/entry_points/server/variables.php';
|
||||
|
||||
@ -36,7 +36,6 @@ class Core
|
||||
'pdf_schema.php',
|
||||
'server_export.php',
|
||||
'server_import.php',
|
||||
'server_status_variables.php',
|
||||
'tbl_addfield.php',
|
||||
'tbl_create.php',
|
||||
'tbl_import.php',
|
||||
|
||||
@ -592,15 +592,14 @@ class Menu
|
||||
$tabs['status']['icon'] = 's_status';
|
||||
$tabs['status']['link'] = Url::getFromRoute('/server/status');
|
||||
$tabs['status']['text'] = __('Status');
|
||||
$tabs['status']['active'] = in_array(basename($GLOBALS['PMA_PHP_SELF']), [
|
||||
'server_status_variables.php',
|
||||
]) || (isset($_REQUEST['route']) && in_array($_REQUEST['route'], [
|
||||
$tabs['status']['active'] = isset($_REQUEST['route']) && in_array($_REQUEST['route'], [
|
||||
'/server/status',
|
||||
'/server/status/advisor',
|
||||
'/server/status/monitor',
|
||||
'/server/status/processes',
|
||||
'/server/status/queries',
|
||||
]));
|
||||
'/server/status/variables',
|
||||
]);
|
||||
|
||||
if ($is_superuser || $isCreateOrGrantUser) {
|
||||
$tabs['rights']['icon'] = 's_rights';
|
||||
|
||||
@ -11,13 +11,12 @@ use PhpMyAdmin\Controllers\Server\Status\VariablesController;
|
||||
use PhpMyAdmin\DatabaseInterface;
|
||||
use PhpMyAdmin\Response;
|
||||
|
||||
if (! defined('ROOT_PATH')) {
|
||||
define('ROOT_PATH', __DIR__ . DIRECTORY_SEPARATOR);
|
||||
if (! defined('PHPMYADMIN')) {
|
||||
exit;
|
||||
}
|
||||
|
||||
global $containerBuilder;
|
||||
|
||||
require_once ROOT_PATH . 'libraries/common.inc.php';
|
||||
require_once ROOT_PATH . 'libraries/server_common.inc.php';
|
||||
require_once ROOT_PATH . 'libraries/replication.inc.php';
|
||||
|
||||
@ -17,7 +17,7 @@
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="server_status_variables.php{{ get_common() }}"{{ active == 'variables' ? ' class="tabactive"' }}>
|
||||
<a href="{{ url('/server/status/variables') }}"{{ active == 'variables' ? ' class="tabactive"' }}>
|
||||
{% trans 'All status variables' %}
|
||||
</a>
|
||||
</li>
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
<div class="row">
|
||||
<fieldset id="tableFilter">
|
||||
<legend>{% trans 'Filters' %}</legend>
|
||||
<form action="server_status_variables.php" method="post">
|
||||
<form action="{{ url('/server/status/variables') }}" method="post">
|
||||
{{ get_hidden_inputs() }}
|
||||
|
||||
<input class="btn btn-secondary" type="submit" value="{% trans 'Refresh' %}">
|
||||
|
||||
@ -153,7 +153,7 @@ class VariablesControllerTest extends TestCase
|
||||
$html
|
||||
);
|
||||
$this->assertStringContainsString(
|
||||
'server_status_variables.php',
|
||||
'index.php?route=/server/status/variables',
|
||||
$html
|
||||
);
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user