mirror of
https://github.com/opensourcepos/opensourcepos.git
synced 2026-04-27 10:31:50 -04:00
download backpus as plain sql file
This commit is contained in:
@@ -133,18 +133,13 @@ class Config extends Secure_area
|
||||
{
|
||||
$this->load->dbutil();
|
||||
$prefs = array(
|
||||
'format' => 'gzip',
|
||||
'format' => 'txt',
|
||||
'filename' => 'ospos.sql'
|
||||
);
|
||||
|
||||
$backup = $this->dbutil->backup($prefs);
|
||||
|
||||
$file_name = 'ospos-' . date("Y-m-d-H-i-s") .'.gz';
|
||||
$save = 'uploads/'.$file_name;
|
||||
|
||||
$this->load->helper('file');
|
||||
write_file($save, $backup);
|
||||
|
||||
$file_name = 'ospos-' . date("Y-m-d-H-i-s") .'.sql';
|
||||
$this->load->helper('download');
|
||||
force_download($file_name, $backup);
|
||||
}
|
||||
|
||||
@@ -97,7 +97,6 @@ if ( ! function_exists('force_download'))
|
||||
header('Pragma: no-cache');
|
||||
header("Content-Length: ".strlen($data));
|
||||
}
|
||||
ob_clean();
|
||||
exit($data);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user