Fix the restore file so that file name can be provided.
This commit is contained in:
parent
9e128ca34e
commit
4dfd71110a
|
|
@ -61,7 +61,6 @@ include "root.php";
|
||||||
$path = ($_SESSION['server']['backup']['path'] != '') ? $_SESSION['server']['backup']['path'] : '/tmp';
|
$path = ($_SESSION['server']['backup']['path'] != '') ? $_SESSION['server']['backup']['path'] : '/tmp';
|
||||||
$file = str_replace(array("/", "\\"),'',$file); //remove slashes to prevent changin the directory with the file name
|
$file = str_replace(array("/", "\\"),'',$file); //remove slashes to prevent changin the directory with the file name
|
||||||
$format = substr($file,-3);
|
$format = substr($file,-3);
|
||||||
$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+ '.$path.'/'.$file.' /'; break;
|
case "rar" : $cmd = 'rar x -ow -o+ '.$path.'/'.$file.' /'; break;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue