From 0f88b847fcee1d4b4745eb5ba4fec72c01e4dc5b Mon Sep 17 00:00:00 2001 From: Andreas Fischer Date: Wed, 12 Jan 2011 23:55:30 +0100 Subject: [PATCH] [ticket/9790] Add $exit parameter to file_gc(). PHPBB3-9790 --- phpBB/includes/functions_download.php | 17 +++++++++++++++-- 1 file 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; + } } /**