mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-27 21:58: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,16 +417,29 @@ function set_modified_headers($stamp, $browser)
|
|||
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;
|
||||
|
||||
if (!empty($cache))
|
||||
{
|
||||
$cache->unload();
|
||||
}
|
||||
|
||||
$db->sql_close();
|
||||
|
||||
if ($exit)
|
||||
{
|
||||
exit;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* HTTP range support (RFC 2616 Section 14.35)
|
||||
|
|
Loading…
Add table
Reference in a new issue