mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-09 04:48:53 +00:00
[feature/attach-dl] Added $archive_path
PHPBB3-11042
This commit is contained in:
parent
2bcff6982a
commit
c6449b4825
1 changed files with 4 additions and 3 deletions
|
@ -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)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Reference in a new issue