Skip to content

Commit 525d706

Browse files
committed
fix for full restore
1 parent bfa6598 commit 525d706

File tree

2 files changed

+16
-12
lines changed

2 files changed

+16
-12
lines changed

web/schedule/restore/index.php

Lines changed: 15 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -23,17 +23,21 @@
2323
if ($_GET['type'] == 'udir') $udir = escapeshellarg($_GET['object']);
2424

2525
if (!empty($_GET['type'])) {
26-
exec (VESTA_CMD."v-schedule-user-restore ".$user." ".$backup." ".$web." ".$dns." ".$mail." ".$db." ".$cron." ".$udir, $output, $return_var);
27-
if ($return_var == 0) {
28-
$_SESSION['restore_msg'] = __('RESTORE_SCHEDULED');
29-
} else {
30-
$_SESSION['restore_msg'] = implode('<br>', $output);
31-
if (empty($_SESSION['restore_msg'])) {
32-
$_SESSION['restore_msg'] = __('Error: vesta did not return any output.');
33-
}
34-
if ($return_var == 4) {
35-
$_SESSION['restore_msg'] = __('RESTORE_EXISTS');
36-
}
26+
$restore_cmd = VESTA_CMD."v-schedule-user-restore ".$user." ".$backup." ".$web." ".$dns." ".$mail." ".$db." ".$cron." ".$udir;
27+
} else {
28+
$restore_cmd = VESTA_CMD."v-schedule-user-restore ".$user." ".$backup;
29+
}
30+
31+
exec ($restore_cmd, $output, $return_var);
32+
if ($return_var == 0) {
33+
$_SESSION['restore_msg'] = __('RESTORE_SCHEDULED');
34+
} else {
35+
$_SESSION['restore_msg'] = implode('<br>', $output);
36+
if (empty($_SESSION['restore_msg'])) {
37+
$_SESSION['restore_msg'] = __('Error: vesta did not return any output.');
38+
}
39+
if ($return_var == 4) {
40+
$_SESSION['restore_msg'] = __('RESTORE_EXISTS');
3741
}
3842
}
3943

web/templates/admin/list_backup_detail.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<tr>
33
<td style="padding: 12px 8px">
44
<div class="submenu-button-block">
5-
<button class="submenu-button" onclick="location.href='/schedule/restore/'"> <?php print __('Restore All');?> </button>
5+
<button class="submenu-button" onclick="location.href='/schedule/restore/?backup=<?php echo $_GET['backup'] ?>'"> <?php print __('Restore All');?> </button>
66
</div>
77
<div class="submenu-search-block">
88
<form action="/search/" method="get">

0 commit comments

Comments
 (0)