X-Git-Url: http://git.rot13.org/?p=BackupPC.git;a=blobdiff_plain;f=lib%2FBackupPC%2FCGI%2FSummary.pm;h=b4fc8d964cc034e4035f8c84d149b61fa74ac6ca;hp=50e730b380c32da02625331b6c81b4de6c0b7579;hb=2a19fd178108b0898e79d2b8908236429ca4c6a3;hpb=a7e968ce327855f2ba2624ca8517069a936c9b5b diff --git a/lib/BackupPC/CGI/Summary.pm b/lib/BackupPC/CGI/Summary.pm index 50e730b..b4fc8d9 100644 --- a/lib/BackupPC/CGI/Summary.pm +++ b/lib/BackupPC/CGI/Summary.pm @@ -28,7 +28,7 @@ # #======================================================================== # -# Version 2.1.0_CVS, released 3 Jul 2003. +# Version 2.1.3, released 21 Jan 2007. # # See http://backuppc.sourceforge.net. # @@ -48,23 +48,18 @@ sub action GetStatusInfo("hosts"); my $Privileged = CheckPermission(); - foreach my $host ( GetUserHosts() ) { ## give access to users hosts only - ## foreach my $host ( sort(keys(%Status)) ) { + foreach my $host ( GetUserHosts(1) ) { my($fullDur, $incrCnt, $incrAge, $fullSize, $fullRate, $reasonHilite); my($shortErr); my @Backups = $bpc->BackupInfoRead($host); my $fullCnt = $incrCnt = 0; my $fullAge = $incrAge = -1; - if ( defined(my $error = $bpc->ConfigRead($host)) ) { - print("dump failed: Can't read PC's config file: $error\n"); - exit(1); - } + $bpc->ConfigRead($host); %Conf = $bpc->Conf(); - if ($Conf{XferMethod} eq "archive" ) { - next; - } + next if ( $Conf{XferMethod} eq "archive" ); + next if ( !$Privileged && !CheckPermission($host) ); for ( my $i = 0 ; $i < @Backups ; $i++ ) { if ( $Backups[$i]{type} eq "full" ) {