removed unused function
[openemr.git] / phpmyadmin / version_check.php
blob78907903f113357dc06bdb6aae86a46ceda24e96
1 <?php
2 /* vim: set expandtab sw=4 ts=4 sts=4: */
3 /**
4 * A caching proxy for retrieving version information from phpmyadmin.net
6 * @package PhpMyAdmin
7 */
9 // Sets up the session
10 define('PMA_MINIMUM_COMMON', true);
11 require_once 'libraries/common.inc.php';
12 require_once 'libraries/Util.class.php';
13 require_once 'libraries/VersionInformation.php';
15 // Always send the correct headers
16 PMA_headerJSON();
18 $versionInformation = new VersionInformation();
19 $versionDetails = $versionInformation->getLatestVersion();
21 if (empty($versionDetails)) {
22 echo json_encode(array());
23 } else {
24 $latestCompatible = $versionInformation->getLatestCompatibleVersion(
25 $versionDetails->releases
27 $version = '';
28 $date = '';
29 if ($latestCompatible != null) {
30 $version = $latestCompatible['version'];
31 $date = $latestCompatible['date'];
33 echo json_encode(
34 array(
35 'version' => (! empty($version) ? $version : ''),
36 'date' => (! empty($date) ? $date : ''),