From e7170755d8e0e95607185fd3966b6d030594eaf2 Mon Sep 17 00:00:00 2001 From: Denis Flaven Date: Mon, 26 Oct 2015 10:38:57 +0000 Subject: [PATCH] Support the download of "bigger-than-memory" backup files. SVN:trunk[3809] --- setup/backup.class.inc.php | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/setup/backup.class.inc.php b/setup/backup.class.inc.php index 9eba18a99..1a0e4cba2 100644 --- a/setup/backup.class.inc.php +++ b/setup/backup.class.inc.php @@ -367,11 +367,14 @@ class DBBackup */ public function DownloadBackup($sFile) { - $oP = new ajax_page('backup'); - $oP->SetContentType("multipart/x-zip"); - $oP->SetContentDisposition('inline', basename($sFile)); - $oP->add(file_get_contents($sFile)); - $oP->output(); + 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); } /**