From 11129a5950d2241ab7921517d7755df6098947a2 Mon Sep 17 00:00:00 2001 From: Andreas Fischer Date: Fri, 10 Aug 2012 02:29:27 +0200 Subject: [PATCH] [feature/attach-dl] Use class_exists/require instead of require_once. PHPBB3-11042 --- phpBB/download/file.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/phpBB/download/file.php b/phpBB/download/file.php index e0e7e48f69..e6afb4f2ae 100644 --- a/phpBB/download/file.php +++ b/phpBB/download/file.php @@ -382,9 +382,13 @@ else trigger_error('SORRY_AUTH_VIEW_ATTACH'); } - require_once $phpbb_root_path . 'includes/functions_compress.' . $phpEx; phpbb_increment_downloads($db, $attachment_ids); + if (!class_exists('compress')) + { + require $phpbb_root_path . 'includes/functions_compress.' . $phpEx; + } + if (!in_array($archive, compress::methods())) { $archive = '.tar';