[feature/attach-dl] Increase download counters closely before streaming archive

PHPBB3-11042
This commit is contained in:
Andreas Fischer 2012-08-10 03:24:15 +02:00
parent e5a3bc03b4
commit ccb0baa20a

View file

@ -329,7 +329,6 @@ else
// sizeof($attachments) >= 1 // sizeof($attachments) >= 1
phpbb_download_handle_passworded_forum($db, $auth, $attachment['topic_id']); phpbb_download_handle_passworded_forum($db, $auth, $attachment['topic_id']);
phpbb_increment_downloads($db, $attachment_ids);
if (!class_exists('compress')) if (!class_exists('compress'))
{ {
@ -397,6 +396,7 @@ else
} }
$compress->close(); $compress->close();
phpbb_increment_downloads($db, $attachment_ids);
$compress->download($store_name, $archive_name); $compress->download($store_name, $archive_name);
file_gc(); file_gc();
} }