mirror of
https://github.com/Piwigo/Piwigo.git
synced 2026-03-28 17:42:57 +01:00
fixes #2499 make the check_for_updates a unique_exec
This commit is contained in:
@@ -3011,7 +3011,10 @@ SELECT
|
||||
|
||||
function pwg_unique_exec_ends($token_name)
|
||||
{
|
||||
global $logger;
|
||||
|
||||
conf_delete_param($token_name.'_running');
|
||||
$logger->info('['.$token_name.'] ends now');
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -42,10 +42,16 @@ if ($conf['update_notify_check_period'] > 0)
|
||||
|
||||
if ($check_for_updates)
|
||||
{
|
||||
include_once(PHPWG_ROOT_PATH.'admin/include/functions.php');
|
||||
include_once(PHPWG_ROOT_PATH.'admin/include/updates.class.php');
|
||||
$updates = new updates();
|
||||
$updates->notify_piwigo_new_versions();
|
||||
$exec_id = pwg_unique_exec_begins('check_for_updates');
|
||||
if (false !== $exec_id)
|
||||
{
|
||||
include_once(PHPWG_ROOT_PATH.'admin/include/functions.php');
|
||||
include_once(PHPWG_ROOT_PATH.'admin/include/updates.class.php');
|
||||
$updates = new updates();
|
||||
$updates->notify_piwigo_new_versions();
|
||||
|
||||
pwg_unique_exec_ends('check_for_updates', $exec_id);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user