2 /* vim: set expandtab sw=4 ts=4 sts=4: */
4 * A caching proxy for retrieving version information from https://www.phpmyadmin.net/
10 use PhpMyAdmin\VersionInformation
;
11 use PhpMyAdmin\Response
;
13 $_GET['ajax_request'] = 'true';
15 require_once 'libraries/common.inc.php';
17 // Disabling standard response.
18 Response
::getInstance()->disable();
20 // Always send the correct headers
23 $versionInformation = new VersionInformation();
24 $versionDetails = $versionInformation->getLatestVersion();
26 if (empty($versionDetails)) {
27 echo json_encode(array());
29 $latestCompatible = $versionInformation->getLatestCompatibleVersion(
30 $versionDetails->releases
34 if ($latestCompatible != null) {
35 $version = $latestCompatible['version'];
36 $date = $latestCompatible['date'];
40 'version' => (! empty($version) ?
$version : ''),
41 'date' => (! empty($date) ?
$date : ''),