1
0
mirror of https://github.com/devcode-it/openstamanager.git synced 2024-12-19 20:00:29 +01:00
openstamanager/modules/aggiornamenti/actions.php
2019-05-03 17:03:42 -07:00

27 lines
579 B
PHP

<?php
include_once __DIR__.'/../../core.php';
$id = post('id');
switch (filter('op')) {
case 'check':
$api = json_decode(get_remote_data('https://api.github.com/repos/devcode-it/openstamanager/releases'), true);
$version = ltrim($api[0]['tag_name'], 'v');
$current = Update::getVersion();
if (version_compare($current, $version) < 0) {
echo $version;
} else {
echo 'none';
}
break;
case 'upload':
include DOCROOT.'/modules/aggiornamenti/upload_modules.php';
break;
}