Skip to content

Commit

Permalink
fix for full restore
Browse files Browse the repository at this point in the history
  • Loading branch information
serghey-rodin committed Oct 21, 2013
1 parent bfa6598 commit 525d706
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 12 deletions.
26 changes: 15 additions & 11 deletions web/schedule/restore/index.php
Expand Up @@ -23,17 +23,21 @@
if ($_GET['type'] == 'udir') $udir = escapeshellarg($_GET['object']);

if (!empty($_GET['type'])) {
exec (VESTA_CMD."v-schedule-user-restore ".$user." ".$backup." ".$web." ".$dns." ".$mail." ".$db." ".$cron." ".$udir, $output, $return_var);
if ($return_var == 0) {
$_SESSION['restore_msg'] = __('RESTORE_SCHEDULED');
} else {
$_SESSION['restore_msg'] = implode('<br>', $output);
if (empty($_SESSION['restore_msg'])) {
$_SESSION['restore_msg'] = __('Error: vesta did not return any output.');
}
if ($return_var == 4) {
$_SESSION['restore_msg'] = __('RESTORE_EXISTS');
}
$restore_cmd = VESTA_CMD."v-schedule-user-restore ".$user." ".$backup." ".$web." ".$dns." ".$mail." ".$db." ".$cron." ".$udir;
} else {
$restore_cmd = VESTA_CMD."v-schedule-user-restore ".$user." ".$backup;
}

exec ($restore_cmd, $output, $return_var);
if ($return_var == 0) {
$_SESSION['restore_msg'] = __('RESTORE_SCHEDULED');
} else {
$_SESSION['restore_msg'] = implode('<br>', $output);
if (empty($_SESSION['restore_msg'])) {
$_SESSION['restore_msg'] = __('Error: vesta did not return any output.');
}
if ($return_var == 4) {
$_SESSION['restore_msg'] = __('RESTORE_EXISTS');
}
}

Expand Down
2 changes: 1 addition & 1 deletion web/templates/admin/list_backup_detail.html
Expand Up @@ -2,7 +2,7 @@
<tr>
<td style="padding: 12px 8px">
<div class="submenu-button-block">
<button class="submenu-button" onclick="location.href='/schedule/restore/'"> <?php print __('Restore All');?> </button>
<button class="submenu-button" onclick="location.href='/schedule/restore/?backup=<?php echo $_GET['backup'] ?>'"> <?php print __('Restore All');?> </button>
</div>
<div class="submenu-search-block">
<form action="/search/" method="get">
Expand Down

0 comments on commit 525d706

Please sign in to comment.