mirror of
https://github.com/Piwigo/Piwigo.git
synced 2026-05-04 20:42:53 +02: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)
|
function pwg_unique_exec_ends($token_name)
|
||||||
{
|
{
|
||||||
|
global $logger;
|
||||||
|
|
||||||
conf_delete_param($token_name.'_running');
|
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)
|
if ($check_for_updates)
|
||||||
{
|
{
|
||||||
include_once(PHPWG_ROOT_PATH.'admin/include/functions.php');
|
$exec_id = pwg_unique_exec_begins('check_for_updates');
|
||||||
include_once(PHPWG_ROOT_PATH.'admin/include/updates.class.php');
|
if (false !== $exec_id)
|
||||||
$updates = new updates();
|
{
|
||||||
$updates->notify_piwigo_new_versions();
|
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