2019-12-28 22:42:25 +01:00
|
|
|
<?php
|
|
|
|
|
|
|
|
global $API_OPTIONS;
|
|
|
|
|
|
|
|
require_once (__DIR__ . '/../internals/base.php');
|
|
|
|
require_once (__DIR__ . '/../internals/programs.php');
|
|
|
|
require_once (__DIR__ . '/../internals/updateslog.php');
|
|
|
|
|
2019-12-29 00:02:38 +01:00
|
|
|
if (!isset($API_OPTIONS['name'])) httpDie(400, "Wrong parameters.");
|
2019-12-28 22:42:25 +01:00
|
|
|
|
|
|
|
$name = $API_OPTIONS['name'];
|
|
|
|
|
2020-01-15 00:45:30 +01:00
|
|
|
$updatedata = UpdatesLog::listUpdateData();
|
2019-12-28 22:42:25 +01:00
|
|
|
|
|
|
|
if (!array_key_exists($name, $updatedata)) httpError(404, 'Invalid Request - [Name] not found');
|
|
|
|
|
|
|
|
$data = $updatedata[$name];
|
|
|
|
|
|
|
|
UpdatesLog::insert($name, $data['version']);
|
|
|
|
|
|
|
|
print($name."<hr>".$data['version']."<hr>".$data['url']);
|