mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-20 00:21:42 +02:00
[feature/attach-dl] Added $archive_path
PHPBB3-11042
This commit is contained in:
@@ -356,14 +356,15 @@ else
|
|||||||
|
|
||||||
$store_name = 'att_' . time() . '_' . unique_id();
|
$store_name = 'att_' . time() . '_' . unique_id();
|
||||||
$archive_name = 'attachments' . $suffix;
|
$archive_name = 'attachments' . $suffix;
|
||||||
|
$archive_path = "{$phpbb_root_path}store/{$store_name}{$archive}";
|
||||||
|
|
||||||
if ($archive === '.zip')
|
if ($archive === '.zip')
|
||||||
{
|
{
|
||||||
$compress = new compress_zip('w', "{$phpbb_root_path}store/{$store_name}{$archive}");
|
$compress = new compress_zip('w', $archive_path);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$compress = new compress_tar('w', "{$phpbb_root_path}store/{$store_name}{$archive}", $archive);
|
$compress = new compress_tar('w', $archive_path, $archive);
|
||||||
}
|
}
|
||||||
|
|
||||||
$extensions = array();
|
$extensions = array();
|
||||||
@@ -397,7 +398,7 @@ else
|
|||||||
$compress->download($store_name, $archive_name);
|
$compress->download($store_name, $archive_name);
|
||||||
}
|
}
|
||||||
|
|
||||||
unlink("{$phpbb_root_path}store/{$store_name}{$archive}");
|
unlink($archive_path);
|
||||||
|
|
||||||
if ($files_added < 1)
|
if ($files_added < 1)
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user