X-Git-Url: http://git.rot13.org/?p=BackupPC.git;a=blobdiff_plain;f=lib%2FBackupPC%2FCGI%2FEmailSummary.pm;h=12ba6ee0efd59dc1bb97942d076f6fc0bb88c347;hp=b775c34f710a1abdcb7f560c526b31d5eb07cfac;hb=f9796d809e6a7d4ed2c356f0f32f1a3d628d3d1f;hpb=f6fbcc3682d2bc9e7dfdc26e95bd5fcdb359496d diff --git a/lib/BackupPC/CGI/EmailSummary.pm b/lib/BackupPC/CGI/EmailSummary.pm index b775c34..12ba6ee 100644 --- a/lib/BackupPC/CGI/EmailSummary.pm +++ b/lib/BackupPC/CGI/EmailSummary.pm @@ -10,7 +10,7 @@ # Craig Barratt # # COPYRIGHT -# Copyright (C) 2003-2007 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.2.0beta0, released 5 April 2009. +# Version 3.2.0, released 31 Jul 2010. # # See http://backuppc.sourceforge.net. # @@ -50,14 +50,32 @@ sub action ReadUserEmailInfo(); my(%EmailStr, $str); foreach my $u ( keys(%UserEmailInfo) ) { - next if ( !defined($UserEmailInfo{$u}{lastTime}) ); - my $emailTimeStr = timeStamp2($UserEmailInfo{$u}{lastTime}); - $EmailStr{$UserEmailInfo{$u}{lastTime}} .= < { + lastTime => $UserEmailInfo{$u}{lastTime}, + lastSubj => $UserEmailInfo{$u}{lastSubj}, + }, + }; + } else { + $info = $UserEmailInfo{$u}; + } + foreach my $host ( keys(%$info) ) { + next if ( !defined($info->{$host}{lastTime}) ); + my $emailTimeStr = timeStamp2($info->{$host}{lastTime}); + $EmailStr{$info->{$host}{lastTime}} .= <${UserLink($u)} - ${HostLink($UserEmailInfo{$u}{lastHost})} + ${HostLink($host)} $emailTimeStr - $UserEmailInfo{$u}{lastSubj} + $info->{$host}{lastSubj} EOF + } } foreach my $t ( sort({$b <=> $a} keys(%EmailStr)) ) { $str .= $EmailStr{$t};