diff options
author | Andreas Fischer <bantu@phpbb.com> | 2011-01-12 23:55:30 +0100 |
---|---|---|
committer | Andreas Fischer <bantu@phpbb.com> | 2011-01-17 00:01:35 +0100 |
commit | 0f88b847fcee1d4b4745eb5ba4fec72c01e4dc5b (patch) | |
tree | faf2025b70570752276925ad90654d0ac7d66f99 /phpBB/includes/functions_download.php | |
parent | 78df30f7b76bf3fb0852c70b4e90e1acddc78b05 (diff) | |
download | forums-0f88b847fcee1d4b4745eb5ba4fec72c01e4dc5b.tar forums-0f88b847fcee1d4b4745eb5ba4fec72c01e4dc5b.tar.gz forums-0f88b847fcee1d4b4745eb5ba4fec72c01e4dc5b.tar.bz2 forums-0f88b847fcee1d4b4745eb5ba4fec72c01e4dc5b.tar.xz forums-0f88b847fcee1d4b4745eb5ba4fec72c01e4dc5b.zip |
[ticket/9790] Add $exit parameter to file_gc().
PHPBB3-9790
Diffstat (limited to 'phpBB/includes/functions_download.php')
-rw-r--r-- | phpBB/includes/functions_download.php | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/phpBB/includes/functions_download.php b/phpBB/includes/functions_download.php index 94d851e383..390ae7a5a4 100644 --- a/phpBB/includes/functions_download.php +++ b/phpBB/includes/functions_download.php @@ -417,15 +417,28 @@ 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(); - exit; + + if ($exit) + { + exit; + } } /** |