Fix the backup extension in the backup class.
This commit is contained in:
parent
d28f86f783
commit
19734f0e3f
|
|
@ -36,7 +36,7 @@ include "root.php";
|
||||||
global $db;
|
global $db;
|
||||||
if ($type == "backup") {
|
if ($type == "backup") {
|
||||||
$backup_path = ($_SESSION['server']['backup']['path'] != '') ? $_SESSION['server']['backup']['path'] : '/tmp';
|
$backup_path = ($_SESSION['server']['backup']['path'] != '') ? $_SESSION['server']['backup']['path'] : '/tmp';
|
||||||
$backup_file = 'backup_'.date('Ymd_His').'.'.$file_format;
|
$backup_file = 'backup_'.date('Ymd_His').'.'.$format;
|
||||||
if (count($_SESSION['backup']['path']) > 0) {
|
if (count($_SESSION['backup']['path']) > 0) {
|
||||||
//determine compression method
|
//determine compression method
|
||||||
switch ($format) {
|
switch ($format) {
|
||||||
|
|
@ -57,7 +57,7 @@ include "root.php";
|
||||||
}
|
}
|
||||||
if ($type == "restore") {
|
if ($type == "restore") {
|
||||||
$backup_path = ($_SESSION['server']['backup']['path'] != '') ? $_SESSION['server']['backup']['path'] : '/tmp';
|
$backup_path = ($_SESSION['server']['backup']['path'] != '') ? $_SESSION['server']['backup']['path'] : '/tmp';
|
||||||
$backup_file = 'backup_'.date('Ymd_His').'.'.$file_format;
|
$backup_file = 'backup_'.date('Ymd_His').'.'.$format;
|
||||||
if (count($_SESSION['backup']['path']) > 0) {
|
if (count($_SESSION['backup']['path']) > 0) {
|
||||||
switch ($format) {
|
switch ($format) {
|
||||||
case "rar" : $cmd = 'rar x -ow -o+ '.$backup_path.'/'.$backup_file.' /'; break;
|
case "rar" : $cmd = 'rar x -ow -o+ '.$backup_path.'/'.$backup_file.' /'; break;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue