[feature/attach-dl] Use class_exists/require instead of require_once.

PHPBB3-11042
This commit is contained in:
Andreas Fischer 2012-08-10 02:29:27 +02:00
parent 93f630e9b1
commit 11129a5950

View file

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