X-Git-Url: http://git.rot13.org/?p=BackupPC.git;a=blobdiff_plain;f=lib%2FBackupPC%2FCGI%2FDirHistory.pm;h=3a9b0c048206447e0aba40b18a7eacd6c56c1b04;hp=728068fe3e0021118efd34a21538bd82ab6830ff;hb=5b3e6091d542c2e7445d5dd511cdf6e20aec8b8d;hpb=a7e968ce327855f2ba2624ca8517069a936c9b5b diff --git a/lib/BackupPC/CGI/DirHistory.pm b/lib/BackupPC/CGI/DirHistory.pm index 728068f..3a9b0c0 100644 --- a/lib/BackupPC/CGI/DirHistory.pm +++ b/lib/BackupPC/CGI/DirHistory.pm @@ -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. # @@ -71,7 +71,8 @@ sub action ErrorExit($Lang->{Nice_try__but_you_can_t_put}); } - for ( $i = 0 ; $i < @Backups ; $i++ ) { + my @backupList = $view->backupList($share, $dir); + foreach $i ( @backupList ) { my $backupTime = timeStamp2($Backups[$i]{startTime}); my $num = $Backups[$i]{num}; $backupNumStr .= "$fDisp"; - my($colSpan, $url, $inode, $type); - my $tdClass = ' class="histView"'; - for ( $i = 0 ; $i < @Backups ; $i++ ) { + $fileStr .= "$fDisp"; + my($colSpan, $url, $inode, $type); + my $tdClass = ' class="histView"'; + foreach $i ( @backupList ) { my($path); if ( $colSpan > 0 ) { # @@ -110,16 +111,16 @@ sub action $colSpan++; next; } - $fileStr .= "" + $fileStr .= "" . "$url"; $colSpan = 0; - $tdClass = ' class="histView"'; + $tdClass = ' class="histView"'; } if ( !defined($hist->{$f}[$i]) ) { $colSpan = 1; $url = " "; $inode = -3; # special value for missing - $tdClass = ' class="histViewMis"'; + $tdClass = ' class="histViewMis"'; next; } if ( $dir eq "" ) { @@ -155,7 +156,7 @@ EOF $colSpan = 1; } if ( $colSpan > 0 ) { - $fileStr .= "$url"; + $fileStr .= "$url"; $colSpan = 0; } $fileStr .= "\n"; @@ -165,8 +166,8 @@ EOF $dirDisplay =~ s{//+}{/}g; $dirDisplay =~ s{/+$}{}g; $dirDisplay = "/" if ( $dirDisplay eq "" ); - my $content = eval("qq{$Lang->{DirHistory_for__host}}"); - Header(eval("qq{$Lang->{DirHistory_backup_for__host}}"), $content); + my $content = eval("qq{$Lang->{DirHistory_for__host}}"); + Header(eval("qq{$Lang->{DirHistory_backup_for__host}}"), $content); Trailer(); }