- fixed configure.pl and makeDist.
[BackupPC.git] / lib / BackupPC / CGI / Summary.pm
index 4d70694..dbf1325 100644 (file)
@@ -28,7 +28,7 @@
 #
 #========================================================================
 #
-# Version 2.1.0_CVS, released 3 Jul 2003.
+# Version 3.0.0alpha, released 23 Jan 2006.
 #
 # See http://backuppc.sourceforge.net.
 #
@@ -48,22 +48,18 @@ sub action
     GetStatusInfo("hosts");
     my $Privileged = CheckPermission();
 
-    foreach my $host ( GetUserHosts(undef, 1) ) {
+    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" ) {