mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-23 10:38:45 +02:00
Merge branch 'support/2.5'
# Conflicts: # datamodels/2.x/itop-hub-connector/zh_cn.dict.itop-hub-connector.php # lib/tcpdf/CHANGELOG.TXT # lib/tcpdf/composer.json # lib/tcpdf/include/tcpdf_fonts.php # lib/tcpdf/include/tcpdf_images.php # lib/tcpdf/include/tcpdf_static.php # lib/tcpdf/tcpdf.php
This commit is contained in:
@@ -528,14 +528,21 @@ if (class_exists('ZipArchive')) // The setup must be able to start even if the "
|
||||
*/
|
||||
public function DownloadBackup($sFile)
|
||||
{
|
||||
header('Content-Description: File Transfer');
|
||||
header('Content-Type: multipart/x-zip');
|
||||
header('Content-Disposition: inline; filename="'.basename($sFile).'"');
|
||||
header('Expires: 0');
|
||||
header('Cache-Control: must-revalidate');
|
||||
header('Pragma: public');
|
||||
header('Content-Length: '.filesize($sFile));
|
||||
readfile($sFile);
|
||||
if (file_exists($sFile))
|
||||
{
|
||||
header('Content-Description: File Transfer');
|
||||
header('Content-Type: multipart/x-zip');
|
||||
header('Content-Disposition: inline; filename="'.basename($sFile).'"');
|
||||
header('Expires: 0');
|
||||
header('Cache-Control: must-revalidate');
|
||||
header('Pragma: public');
|
||||
header('Content-Length: '.filesize($sFile));
|
||||
readfile($sFile) ;
|
||||
}
|
||||
else
|
||||
{
|
||||
throw new InvalidParameterException('Invalid file path');
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user