mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 06:08:52 +00:00
[ticket/9790] Add $exit parameter to file_gc().
PHPBB3-9790
This commit is contained in:
parent
78df30f7b7
commit
0f88b847fc
1 changed files with 15 additions and 2 deletions
|
@ -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;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Add table
Reference in a new issue