1
0
mirror of https://github.com/phpmyadmin/phpmyadmin.git synced 2026-10-23 18:29:15 +03:00
Files
phpmyadmin/version_check.php
Christian Foellmann 1a9d426115 UPDATE 4.4.0.0
2015-04-02 13:04:31 +02:00

31 lines
708 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 : ''),
)
);
}
?>