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';