\n"; goto FAILED; } elsif (@errs) { print "",&text('restore_rerrors2', join(", ", &unique(map { $_->{'desc'} } @criticalerrs))), "
\n"; } # Tell the user what will be done print &ui_alert_box(&text('restore_from', $nice), 'warn'); print &ui_form_start("restore.cgi", "form-data"); print &ui_hidden("origsrc", $origsrc); # Show domains with features below them @links = ( &select_all_link("dom", 0), &select_invert_link("dom", 0) ); print &ui_links_row(\@links); %plugins = map { $_, 1 } &list_backup_plugins(); print "
\n"; } print &ui_form_end(); } else { # Actually execute the restore if (@doms) { print &text('restore_doing', scalar(@doms), $nice),"
\n"; } else { print &text('restore_doing2', scalar(@vbs), $nice),"
\n"; } $ok = &restore_domains($src, \@doms, \@do_features, \%options, \@vbs, 0, $ipinfo, !$safe_backup, $in{'skipwarnings'}, $key, $in{'continue'}, $in{'delete_existing'}); &run_post_actions(); if ($ok) { print &text('restore_done'),"
\n"; } else { print &text('restore_failed'),"
\n"; } if ($origsrc eq "upload:") { # Delete uploaded temp file &unlink_file($src); } &webmin_log("restore", $src, undef, { 'doms' => [ map { $_->{'dom'} } @doms ] }); # Call any theme post command foreach my $d (@doms) { if (!$log->{'plugged'} && defined(&theme_post_save_domain)) { &theme_post_save_domain($d, $d->{'missing'} ? 'create' : 'modify'); } last; # No need to call for each domain } } FAILED: if (defined($in{'onedom'})) { # Link is back to view/edit form &ui_print_footer(&domain_footer_link(&get_domain($in{'onedom'}))); } else { &ui_print_footer($in{'return'} || "", $text{'index_return'}); }