Use the router for version_check.php
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
This commit is contained in:
parent
ce5cc3c658
commit
987d5546fa
@ -268,6 +268,9 @@ if (isset($_GET['route']) || isset($_POST['route'])) {
|
||||
$routes->addRoute(['GET', 'POST'], '/user_password', function () {
|
||||
require_once ROOT_PATH . 'libraries/entry_points/user_password.php';
|
||||
});
|
||||
$routes->addRoute(['GET', 'POST'], '/version_check', function () {
|
||||
require_once ROOT_PATH . 'libraries/entry_points/version_check.php';
|
||||
});
|
||||
});
|
||||
$routeInfo = $dispatcher->dispatch(
|
||||
$_SERVER['REQUEST_METHOD'],
|
||||
|
||||
@ -4126,7 +4126,7 @@ AJAX.registerOnload('functions.js', function () {
|
||||
if ($('li.jsversioncheck').length > 0) {
|
||||
$.ajax({
|
||||
dataType: 'json',
|
||||
url: 'version_check.php',
|
||||
url: 'index.php?route=/version_check',
|
||||
method: 'POST',
|
||||
data: {
|
||||
'server': CommonParams.get('server')
|
||||
|
||||
@ -11,14 +11,12 @@ use PhpMyAdmin\Core;
|
||||
use PhpMyAdmin\Response;
|
||||
use PhpMyAdmin\VersionInformation;
|
||||
|
||||
if (! defined('ROOT_PATH')) {
|
||||
define('ROOT_PATH', __DIR__ . DIRECTORY_SEPARATOR);
|
||||
if (! defined('PHPMYADMIN')) {
|
||||
exit;
|
||||
}
|
||||
|
||||
$_GET['ajax_request'] = 'true';
|
||||
|
||||
require_once ROOT_PATH . 'libraries/common.inc.php';
|
||||
|
||||
// Disabling standard response.
|
||||
Response::getInstance()->disable();
|
||||
|
||||
Loading…
Reference in New Issue
Block a user