X-Git-Url: http://git.rot13.org/?p=BackupPC.git;a=blobdiff_plain;f=lib%2FBackupPC%2FCGI%2FHostInfo.pm;h=d43ccfcd6239b88850b5f9d1c0784fce9d3f4e55;hp=5c20ef78687e0d7198aa7df2916a2e074aef4d15;hb=f9796d809e6a7d4ed2c356f0f32f1a3d628d3d1f;hpb=5b3e6091d542c2e7445d5dd511cdf6e20aec8b8d diff --git a/lib/BackupPC/CGI/HostInfo.pm b/lib/BackupPC/CGI/HostInfo.pm index 5c20ef7..d43ccfc 100644 --- a/lib/BackupPC/CGI/HostInfo.pm +++ b/lib/BackupPC/CGI/HostInfo.pm @@ -10,7 +10,7 @@ # Craig Barratt # # COPYRIGHT -# Copyright (C) 2003 Craig Barratt +# Copyright (C) 2003-2009 Craig Barratt # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -28,7 +28,7 @@ # #======================================================================== # -# Version 3.0.0alpha, released 23 Jan 2006. +# Version 3.2.0, released 31 Jul 2010. # # See http://backuppc.sourceforge.net. # @@ -148,6 +148,7 @@ EOF } my $age = sprintf("%.1f", (time - $Backups[$i]{startTime}) / (24*3600)); my $browseURL = "$MyURL?action=browse&host=${EscURI($host)}&num=$Backups[$i]{num}"; + my $level = $Backups[$i]{level}; my $filled = $Backups[$i]{noFill} ? $Lang->{No} : $Lang->{Yes}; $filled .= " ($Backups[$i]{fillFromNum}) " if ( $Backups[$i]{fillFromNum} ne "" ); @@ -156,6 +157,7 @@ EOF $Backups[$i]{num} $ltype $filled + $level $startTime $duration $age @@ -246,8 +248,15 @@ EOF if ( $user ne "" ) { $statusStr .= eval("qq{$Lang->{This_PC_is_used_by}$moreUserStr}"); } - if ( defined($UserEmailInfo{$user}) + if ( defined($UserEmailInfo{$user}) && defined($UserEmailInfo{$user}{$host}) ) { + my $mailTime = timeStamp2($UserEmailInfo{$user}{$host}{lastTime}); + my $subj = $UserEmailInfo{$user}{$host}{lastSubj}; + $statusStr .= eval("qq{$Lang->{Last_email_sent_to__was_at___subject}}"); + } elsif ( defined($UserEmailInfo{$user}) && $UserEmailInfo{$user}{lastHost} eq $host ) { + # + # Old format %UserEmailInfo - pre 3.2.0. + # my $mailTime = timeStamp2($UserEmailInfo{$user}{lastTime}); my $subj = $UserEmailInfo{$user}{lastSubj}; $statusStr .= eval("qq{$Lang->{Last_email_sent_to__was_at___subject}}"); @@ -345,11 +354,13 @@ EOF if ( @Backups ) { # only allow incremental if there are already some backups $startIncrStr = < + EOF } - $startIncrStr = eval ("qq{$startIncrStr}"); + $startIncrStr = eval("qq{$startIncrStr}"); my $content = eval("qq{$Lang->{Host__host_Backup_Summary2}}"); Header(eval("qq{$Lang->{Host__host_Backup_Summary}}"), $content); Trailer();