[ticket/9790] Add $exit parameter to file_gc().

PHPBB3-9790
This commit is contained in:
Andreas Fischer 2011-01-12 23:55:30 +01:00
parent 78df30f7b7
commit 0f88b847fc

View file

@ -417,15 +417,28 @@ function set_modified_headers($stamp, $browser)
return false; return false;
} }
function file_gc() /**
* Garbage Collection
*
* @param bool $exit Whether to die or not.
*
* @return void
*/
function file_gc($exit = true)
{ {
global $cache, $db; global $cache, $db;
if (!empty($cache)) if (!empty($cache))
{ {
$cache->unload(); $cache->unload();
} }
$db->sql_close(); $db->sql_close();
exit;
if ($exit)
{
exit;
}
} }
/** /**