X-Git-Url: http://git.rot13.org/?p=BackupPC.git;a=blobdiff_plain;f=lib%2FBackupPC%2FCGI%2FRestore.pm;h=e494ace3cf610b4c143206a149019d0039ae56fa;hp=d43d70da790dd164633be7145c9f977862a6eeb5;hb=5b3e6091d542c2e7445d5dd511cdf6e20aec8b8d;hpb=d13d57e035dac9362ca393991b978530402969b7 diff --git a/lib/BackupPC/CGI/Restore.pm b/lib/BackupPC/CGI/Restore.pm index d43d70d..e494ace 100644 --- a/lib/BackupPC/CGI/Restore.pm +++ b/lib/BackupPC/CGI/Restore.pm @@ -28,7 +28,7 @@ # #======================================================================== # -# Version 2.1.0, released 20 Jun 2004. +# Version 3.0.0alpha, released 23 Jan 2006. # # See http://backuppc.sourceforge.net. # @@ -112,35 +112,30 @@ EOF # $content .= eval("qq{$Lang->{Restore_Options_for__host2}}"); - # - # If there is a single host, make sure direct restore is enabled - # if ( @hosts == 1 ) { # # Pick up the host's config file # $bpc->ConfigRead($hosts[0]); %Conf = $bpc->Conf(); + } - # - # Decide if option 1 (direct restore) is available based - # on whether the restore command is set. - # - my $cmd = $Conf{XferMethod} eq "smb" ? $Conf{SmbClientRestoreCmd} - : $Conf{XferMethod} eq "tar" ? $Conf{TarClientRestoreCmd} - : $Conf{XferMethod} eq "archive" ? undef - : $Conf{RsyncRestoreArgs}; - if ( defined($cmd) ) { - $content .= eval( - "qq{$Lang->{Restore_Options_for__host_Option1}}"); - } else { - my $hostDest = $hosts[0]; - $content .= eval( - "qq{$Lang->{Restore_Options_for__host_Option1_disabled}}"); - } - } else { - $content .= eval("qq{$Lang->{Restore_Options_for__host_Option1}}"); - } + # + # Decide if option 1 (direct restore) is available based + # on whether the restore command is set. + # + my $cmd = $Conf{XferMethod} eq "smb" ? $Conf{SmbClientRestoreCmd} + : $Conf{XferMethod} eq "tar" ? $Conf{TarClientRestoreCmd} + : $Conf{XferMethod} eq "archive" ? undef + : $Conf{RsyncRestoreArgs}; + if ( defined($cmd) ) { + $content .= eval( + "qq{$Lang->{Restore_Options_for__host_Option1}}"); + } else { + my $hostDest = $hosts[0]; + $content .= eval( + "qq{$Lang->{Restore_Options_for__host_Option1_disabled}}"); + } # # Verify that Archive::Zip is available before showing the