2017-11-09 17:43:34 +01:00
|
|
|
<?php
|
|
|
|
global $OPTIONS;
|
|
|
|
|
|
|
|
require_once (__DIR__ . '/../internals/base.php');
|
2017-11-20 17:15:12 +01:00
|
|
|
require_once (__DIR__ . '/../internals/programs.php');
|
2018-02-03 15:44:40 +01:00
|
|
|
require_once (__DIR__ . '/../internals/updateslog.php');
|
2017-11-09 17:43:34 +01:00
|
|
|
|
|
|
|
$name = $OPTIONS['name'];
|
|
|
|
|
2018-01-27 00:35:13 +01:00
|
|
|
$updatedata = Programs::listUpdateData();
|
2017-11-09 17:43:34 +01:00
|
|
|
|
2017-11-20 17:15:12 +01:00
|
|
|
if (! array_key_exists($name, $updatedata)) httpError(404, 'Invalid Request - [Name] not found');
|
2017-11-09 17:43:34 +01:00
|
|
|
|
2017-11-20 17:15:12 +01:00
|
|
|
$data = $updatedata[$name];
|
2017-11-09 17:43:34 +01:00
|
|
|
|
2018-02-03 15:44:40 +01:00
|
|
|
UpdatesLog::insert($name, $data['version']);
|
|
|
|
|
|
|
|
print($name."<hr>".$data['version']."<hr>".$data['url']);
|