projects
/
fa-stable.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Client side ajax library
[fa-stable.git]
/
admin
/
backups.php
diff --git
a/admin/backups.php
b/admin/backups.php
index dd73be6d899ef0d73ba8974255dfdb95e1bd5eb6..4fcc453fe44516c0313b5ccf7abb469537bed312 100644
(file)
--- a/
admin/backups.php
+++ b/
admin/backups.php
@@
-46,7
+46,7
@@
echo "
alert('" . _('This extension can not be be viewed: ') . "' + ext)
return
}
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
}
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 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'];
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 "";
}
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'];
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 "";
}
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();
{
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);
while (($file = readdir($dh)) !== false)
$ar_files[] = $file;
closedir($dh);
@@
-266,8
+266,8
@@
function valid_paths()
global $path_to_root;
$st = "";
global $path_to_root;
$st = "";
- if (!file_exists(
$path_to_root .
BACKUP_PATH))
- $st .= " - " . _("cannot find backup directory") . " - " .
$path_to_root .
BACKUP_PATH . "<br>";
+ if (!file_exists(BACKUP_PATH))
+ $st .= " - " . _("cannot find backup directory") . " - " . BACKUP_PATH . "<br>";
return $st;
}
return $st;
}