X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=blobdiff_plain;f=admin%2Fbackups.php;h=4fcc453fe44516c0313b5ccf7abb469537bed312;hb=f7d5b6bb6541df3591610e08bf83ccb8b107ea31;hp=dd73be6d899ef0d73ba8974255dfdb95e1bd5eb6;hpb=da8311619dd73feae101d246a1957b972e00cbd2;p=fa-stable.git
diff --git a/admin/backups.php b/admin/backups.php
index dd73be6d..4fcc453f 100644
--- a/admin/backups.php
+++ b/admin/backups.php
@@ -46,7 +46,7 @@ echo "
alert('" . _('This extension can not be be viewed: ') . "' + ext)
return
}
- window.open('" . $path_to_root . BACKUP_PATH . "'+pFilename, '', 'toolbar=no,scrollbars=yes')
+ window.open('" . BACKUP_PATH . "'+pFilename, '', 'toolbar=no,scrollbars=yes')
}
function deleteBackup() {
pFilename = document.forms[0].cmb_backups.options[document.forms[0].cmb_backups.selectedIndex].value
@@ -128,14 +128,14 @@ function handle_form($conn)
//Download the file
if ($_GET['c']=='d')
{
- download_file($path_to_root . BACKUP_PATH . $_GET['fn']);
+ download_file(BACKUP_PATH . $_GET['fn']);
exit;
}
//Delete the file
if ($_GET['c']=='df')
{
$filename = $_GET['fn'];
- @unlink($path_to_root . BACKUP_PATH . $filename);
+ @unlink(BACKUP_PATH . $filename);
header("Location: backups.php?c=dff&fn=" . urlencode($filename));
return "";
}
@@ -166,7 +166,7 @@ function handle_form($conn)
if ($_GET['c']=='r')
{
$filename=$_GET['fn'];
- restore_backup($path_to_root . BACKUP_PATH . $filename, $conn);
+ restore_backup(BACKUP_PATH . $filename, $conn);
header("Location: backups.php?c=rs&fn=" . urlencode($filename));
return "";
}
@@ -216,8 +216,8 @@ function get_backup_file_combo()
{
global $path_to_root;
$ar_files = array();
-
- $dh = opendir($path_to_root . BACKUP_PATH);
+ default_focus('cmb_backups');
+ $dh = opendir(BACKUP_PATH);
while (($file = readdir($dh)) !== false)
$ar_files[] = $file;
closedir($dh);
@@ -266,8 +266,8 @@ function valid_paths()
global $path_to_root;
$st = "";
- if (!file_exists($path_to_root . BACKUP_PATH))
- $st .= " - " . _("cannot find backup directory") . " - " . $path_to_root . BACKUP_PATH . "
";
+ if (!file_exists(BACKUP_PATH))
+ $st .= " - " . _("cannot find backup directory") . " - " . BACKUP_PATH . "
";
return $st;
}