mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-27 15:54:29 +02:00
New update manager specification changes
This commit is contained in:
parent
60df86a8d4
commit
cf157c70c1
@ -525,17 +525,20 @@ function update_manager_register_instance () {
|
|||||||
function update_manager_download_messages () {
|
function update_manager_download_messages () {
|
||||||
global $config;
|
global $config;
|
||||||
|
|
||||||
// TODO: Delete old messages
|
//Do not ask in next 2 hours
|
||||||
|
config_update_value ('last_um_check', time() + 2 * SECONDS_1HOUR);
|
||||||
|
if (!isset ($config['pandora_uid'])) return;
|
||||||
|
|
||||||
|
// Delete old messages
|
||||||
|
db_get_sql('DELETE FROM tupdate WHERE UNIX_TIMESTAMP(filename) < UNIX_TIMESTAMP(NOW())');
|
||||||
|
|
||||||
// Build the curl request
|
// Build the curl request
|
||||||
$params = array(
|
$params = array(
|
||||||
'pandora_uid' => $config['pandora_uid']
|
'pandora_uid' => $config['pandora_uid'],
|
||||||
|
'timezone' => $config['timezone']
|
||||||
);
|
);
|
||||||
|
|
||||||
$result = update_manager_curl_request ('get_messages', $params);
|
$result = update_manager_curl_request ('get_messages', $params);
|
||||||
|
|
||||||
//Do not ask in next 2 hours
|
|
||||||
config_update_value ('last_um_check', time() + 2 * SECONDS_1HOUR);
|
|
||||||
|
|
||||||
if (!$result['success']) {
|
if (!$result['success']) {
|
||||||
return ($result['update_message']);
|
return ($result['update_message']);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user