diff options
| author | Andreas Fischer <bantu@phpbb.com> | 2012-08-10 02:29:27 +0200 |
|---|---|---|
| committer | Andreas Fischer <bantu@phpbb.com> | 2012-08-10 02:36:38 +0200 |
| commit | 11129a5950d2241ab7921517d7755df6098947a2 (patch) | |
| tree | fe80c82ebac2e1003d582caca1510aa5bb5f931d /phpBB/download | |
| parent | 93f630e9b18ec1540654a371f0214ab50b271998 (diff) | |
| download | forums-11129a5950d2241ab7921517d7755df6098947a2.tar forums-11129a5950d2241ab7921517d7755df6098947a2.tar.gz forums-11129a5950d2241ab7921517d7755df6098947a2.tar.bz2 forums-11129a5950d2241ab7921517d7755df6098947a2.tar.xz forums-11129a5950d2241ab7921517d7755df6098947a2.zip | |
[feature/attach-dl] Use class_exists/require instead of require_once.
PHPBB3-11042
Diffstat (limited to 'phpBB/download')
| -rw-r--r-- | phpBB/download/file.php | 6 |
1 files changed, 5 insertions, 1 deletions
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'; |
