Fix a typo in the ubuntu/debian install scripts.
This commit is contained in:
parent
0966efeac6
commit
b767c12374
|
|
@ -34,7 +34,7 @@ include "root.php";
|
||||||
public function command($type, $file) {
|
public function command($type, $file) {
|
||||||
if ($type == "backup") {
|
if ($type == "backup") {
|
||||||
$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 changing the directory with the file name
|
||||||
$format = substr($file,-3);
|
$format = substr($file,-3);
|
||||||
if (strlen($file) == 3) {
|
if (strlen($file) == 3) {
|
||||||
$file = 'backup_'.date('Ymd_His').'.'.$format;
|
$file = 'backup_'.date('Ymd_His').'.'.$format;
|
||||||
|
|
@ -59,7 +59,7 @@ include "root.php";
|
||||||
}
|
}
|
||||||
if ($type == "restore") {
|
if ($type == "restore") {
|
||||||
$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 changing the directory with the file name
|
||||||
$format = substr($file,-3);
|
$format = substr($file,-3);
|
||||||
if (count($_SESSION['backup']['path']) > 0) {
|
if (count($_SESSION['backup']['path']) > 0) {
|
||||||
switch ($format) {
|
switch ($format) {
|
||||||
|
|
@ -101,7 +101,7 @@ include "root.php";
|
||||||
public function download($file) {
|
public function download($file) {
|
||||||
$path = ($_SESSION['server']['backup']['path'] != '') ? $_SESSION['server']['backup']['path'] : '/tmp';
|
$path = ($_SESSION['server']['backup']['path'] != '') ? $_SESSION['server']['backup']['path'] : '/tmp';
|
||||||
session_cache_limiter('public');
|
session_cache_limiter('public');
|
||||||
$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 changing the directory with the file name
|
||||||
if (file_exists($path."/".$file)) {
|
if (file_exists($path."/".$file)) {
|
||||||
$fd = fopen($path."/".$file, 'rb');
|
$fd = fopen($path."/".$file, 'rb');
|
||||||
header("Content-Type: application/octet-stream");
|
header("Content-Type: application/octet-stream");
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue