projects
/
fa-stable.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
e39d778
)
Suppressed page update after import errors.
author
Janusz Dobrowolski
<janusz@frontaccounting.eu>
Mon, 10 Nov 2008 13:32:38 +0000
(13:32 +0000)
committer
Janusz Dobrowolski
<janusz@frontaccounting.eu>
Mon, 10 Nov 2008 13:32:38 +0000
(13:32 +0000)
admin/backups.php
patch
|
blob
|
history
diff --git
a/admin/backups.php
b/admin/backups.php
index 9796a492ce5c442ba79cd9dc5b71678aa9284b6c..e653757977360e8a2af23eaf32c78617f572773f 100644
(file)
--- a/
admin/backups.php
+++ b/
admin/backups.php
@@
-168,8
+168,8
@@
function handle_form($conn)
if ($_GET['c']=='r')
{
$filename=$_GET['fn'];
if ($_GET['c']=='r')
{
$filename=$_GET['fn'];
- restore_backup(BACKUP_PATH . $filename, $conn);
- header("Location: backups.php?c=rs&fn=" . urlencode($filename));
+ if( restore_backup(BACKUP_PATH . $filename, $conn) )
+
header("Location: backups.php?c=rs&fn=" . urlencode($filename));
return "";
}
//Print restore success message
return "";
}
//Print restore success message
@@
-184,8
+184,10
@@
function handle_form($conn)
$filename = $_FILES['uploadfile']['tmp_name'];
if (is_uploaded_file ($filename))
{
$filename = $_FILES['uploadfile']['tmp_name'];
if (is_uploaded_file ($filename))
{
- restore_backup($filename, $conn);
- $msg = _("Uploaded file has been restored.");
+ if( restore_backup($filename, $conn) )
+ $msg = _("Uploaded file has been restored.");
+ else
+ $msg = _("Database restore failed.");
}
else
{
}
else
{