1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-07-30 21:40:43 +02:00

some tiny fixes...

git-svn-id: file:///svn/phpbb/trunk@8087 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
Meik Sievertsen
2007-09-12 15:32:11 +00:00
parent 01b46eb4e0
commit e503216834
7 changed files with 35 additions and 12 deletions

View File

@@ -259,18 +259,29 @@ switch ($cron_type)
// Unloading cache and closing db after having done the dirty work.
if ($use_shutdown_function)
{
register_shutdown_function('unlock_cron');
register_shutdown_function('garbage_collection');
}
else
{
unlock_cron();
garbage_collection();
}
$sql = 'UPDATE ' . CONFIG_TABLE . "
SET config_value = '0'
WHERE config_name = 'cron_lock' AND config_value = '" . $db->sql_escape(CRON_ID) . "'";
$db->sql_query($sql);
exit;
/**
* Unlock cron script
*/
function unlock_cron()
{
global $db;
$sql = 'UPDATE ' . CONFIG_TABLE . "
SET config_value = '0'
WHERE config_name = 'cron_lock' AND config_value = '" . $db->sql_escape(CRON_ID) . "'";
$db->sql_query($sql);
}
?>