2 /* vim: set expandtab sw=4 ts=4 sts=4: */
4 * A caching proxy for retrieving version information from phpmyadmin.net
10 use PMA\libraries\VersionInformation
;
12 define('PMA_MINIMUM_COMMON', true);
13 require_once 'libraries/common.inc.php';
14 require_once 'libraries/VersionInformation.php';
16 // Always send the correct headers
19 $versionInformation = new VersionInformation();
20 $versionDetails = $versionInformation->getLatestVersion();
22 if (empty($versionDetails)) {
23 echo json_encode(array());
25 $latestCompatible = $versionInformation->getLatestCompatibleVersion(
26 $versionDetails->releases
30 if ($latestCompatible != null) {
31 $version = $latestCompatible['version'];
32 $date = $latestCompatible['date'];
36 'version' => (! empty($version) ?
$version : ''),
37 'date' => (! empty($date) ?
$date : ''),