aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/cron.php
diff options
context:
space:
mode:
Diffstat (limited to 'phpBB/cron.php')
-rw-r--r--phpBB/cron.php13
1 files changed, 7 insertions, 6 deletions
diff --git a/phpBB/cron.php b/phpBB/cron.php
index 9f2c59966c..38bcd38d3e 100644
--- a/phpBB/cron.php
+++ b/phpBB/cron.php
@@ -207,14 +207,15 @@ switch ($cron_type)
break;
}
-// Unload cache, must be done before the DB connection is closed
-if (!empty($cache))
+// Unloading cache and closing db after having done the dirty work.
+if ($use_shutdown_function)
{
- $cache->unload();
+ register_shutdown_function('garbage_collection');
+}
+else
+{
+ garbage_collection();
}
-
-// Close our DB connection.
-$db->sql_close();
// Output transparent gif
header('Cache-Control: no-cache');