Use the router for the server_plugins.php page
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
This commit is contained in:
parent
a482e45137
commit
a94159fd46
@ -24,8 +24,13 @@ if (isset($_GET['route']) || isset($_POST['route'])) {
|
||||
$routes->addRoute(['GET', 'POST'], '[/]', function () {
|
||||
require_once ROOT_PATH . 'libraries/entry_points/home.php';
|
||||
});
|
||||
$routes->addRoute(['GET', 'POST'], '/server/databases', function () {
|
||||
require_once ROOT_PATH . 'libraries/entry_points/server_databases.php';
|
||||
$routes->addGroup('/server', function (RouteCollector $routes) {
|
||||
$routes->addRoute(['GET', 'POST'], '/databases', function () {
|
||||
require_once ROOT_PATH . 'libraries/entry_points/server_databases.php';
|
||||
});
|
||||
$routes->addRoute('GET', '/plugins', function () {
|
||||
require_once ROOT_PATH . 'libraries/entry_points/server_plugins.php';
|
||||
});
|
||||
});
|
||||
});
|
||||
$routeInfo = $dispatcher->dispatch(
|
||||
|
||||
@ -659,7 +659,7 @@ class Menu
|
||||
$tabs['engine']['text'] = __('Engines');
|
||||
|
||||
$tabs['plugins']['icon'] = 'b_plugin';
|
||||
$tabs['plugins']['link'] = 'server_plugins.php';
|
||||
$tabs['plugins']['link'] = Url::getFromRoute('/server/plugins');
|
||||
$tabs['plugins']['text'] = __('Plugins');
|
||||
|
||||
return $tabs;
|
||||
|
||||
@ -10,11 +10,11 @@ declare(strict_types=1);
|
||||
use PhpMyAdmin\Controllers\Server\PluginsController;
|
||||
use PhpMyAdmin\Response;
|
||||
|
||||
if (! defined('ROOT_PATH')) {
|
||||
define('ROOT_PATH', __DIR__ . DIRECTORY_SEPARATOR);
|
||||
if (! defined('PHPMYADMIN')) {
|
||||
exit;
|
||||
}
|
||||
|
||||
require_once ROOT_PATH . 'libraries/common.inc.php';
|
||||
global $containerBuilder;
|
||||
|
||||
/** @var PluginsController $controller */
|
||||
$controller = $containerBuilder->get(PluginsController::class);
|
||||
Loading…
Reference in New Issue
Block a user