diff --git a/application/controllers/config.php b/application/controllers/config.php index a75dee706..1b83cb66e 100644 --- a/application/controllers/config.php +++ b/application/controllers/config.php @@ -133,13 +133,14 @@ class Config extends Secure_area { $this->load->dbutil(); $prefs = array( - 'format' => 'txt', + 'format' => 'zip', 'filename' => 'ospos.sql' ); - $backup = $this->dbutil->backup($prefs); + $backup =& $this->dbutil->backup($prefs); - $file_name = 'ospos-' . date("Y-m-d-H-i-s") .'.sql'; + $file_name = 'ospos-' . date("Y-m-d-H-i-s") .'.zip'; + $save = 'uploads/'.$file_name; $this->load->helper('download'); while (ob_get_level()) { ob_end_clean(); diff --git a/system/helpers/download_helper.php b/system/helpers/download_helper.php index 16ee4e9cd..23ddb87fc 100644 --- a/system/helpers/download_helper.php +++ b/system/helpers/download_helper.php @@ -86,7 +86,6 @@ if ( ! function_exists('force_download')) header('Cache-Control: must-revalidate, post-check=0, pre-check=0'); header("Content-Transfer-Encoding: binary"); header('Pragma: public'); - header("Content-Length: ".strlen($data)); } else { @@ -95,7 +94,6 @@ if ( ! function_exists('force_download')) header("Content-Transfer-Encoding: binary"); header('Expires: 0'); header('Pragma: no-cache'); - header("Content-Length: ".strlen($data)); } exit($data); }