Use the router for version_check.php

Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
This commit is contained in:
Maurício Meneghini Fauth 2019-08-20 00:31:47 -03:00
parent ce5cc3c658
commit 987d5546fa
3 changed files with 6 additions and 5 deletions

View File

@ -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'],

View File

@ -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')

View File

@ -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();