1
0
mirror of https://github.com/phpmyadmin/phpmyadmin.git synced 2026-10-25 06:39:48 +03:00
Files
phpmyadmin/version_check.php
Christian Foellmann 718ef314e3 UPDATE 4.5.0.1
2015-09-24 12:19:45 +02:00

29 lines
704 B
PHP

<?php
/* vim: set expandtab sw=4 ts=4 sts=4: */
/**
* A caching proxy for retrieving version information from phpmyadmin.net
*
* @package PhpMyAdmin
*/
// Sets up the session
define('PMA_MINIMUM_COMMON', true);
require_once 'libraries/common.inc.php';
require_once 'libraries/Util.class.php';
// Always send the correct headers
header('Content-type: application/json; charset=UTF-8');
$version = PMA_Util::getLatestVersion();
if (empty($version)) {
echo json_encode(array());
} else {
echo json_encode(
array(
'version' => (! empty($version->version) ? $version->version : ''),
'date' => (! empty($version->date) ? $version->date : ''),
)
);
}