1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-07-31 22:10:45 +02:00

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