Fix the backup extension in the backup class.

This commit is contained in:
Mark Crane 2014-11-13 02:11:23 +00:00
parent d28f86f783
commit 19734f0e3f
1 changed files with 2 additions and 2 deletions

View File

@ -36,7 +36,7 @@ include "root.php";
global $db;
if ($type == "backup") {
$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) {
//determine compression method
switch ($format) {
@ -57,7 +57,7 @@ include "root.php";
}
if ($type == "restore") {
$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) {
switch ($format) {
case "rar" : $cmd = 'rar x -ow -o+ '.$backup_path.'/'.$backup_file.' /'; break;