spamassassin-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From j.@apache.org
Subject svn commit: r398365 - /spamassassin/trunk/masses/rule-qa/automc/ruleqa.cgi
Date Sun, 30 Apr 2006 16:09:01 GMT
Author: jm
Date: Sun Apr 30 09:09:00 2006
New Revision: 398365

URL: http://svn.apache.org/viewcvs?rev=398365&view=rev
Log:
oops, better backwards-compat handling

Modified:
    spamassassin/trunk/masses/rule-qa/automc/ruleqa.cgi

Modified: spamassassin/trunk/masses/rule-qa/automc/ruleqa.cgi
URL: http://svn.apache.org/viewcvs/spamassassin/trunk/masses/rule-qa/automc/ruleqa.cgi?rev=398365&r1=398364&r2=398365&view=diff
==============================================================================
--- spamassassin/trunk/masses/rule-qa/automc/ruleqa.cgi (original)
+++ spamassassin/trunk/masses/rule-qa/automc/ruleqa.cgi Sun Apr 30 09:09:00 2006
@@ -1158,10 +1158,9 @@
       $drtitle =~ s/^(.{0,160}).*$/$1/gs;
 
       my $mds_as_text = '';
-      if (defined $fastinfo->{mclogmds} && $fastinfo->{mclogmds}->{mclogmd})
{
-        # $mds_as_text = XMLout($fastinfo->{mclogmds});
-        # use Data::Dumper; $mds_as_text = Dumper($fastinfo->{mclogmds});
-
+      if ($fastinfo->{mclogmds} && 
+            ref $fastinfo->{mclogmds} =~ /HASH/)
+      {
         # 'mclogmd' => [
         #    {
         #      'daterev' => '20060430/r398298-n',
@@ -1172,20 +1171,26 @@
         #      'fsize' => '3036336'
         #    }, [...]
 
+        # $mds_as_text = XMLout($fastinfo->{mclogmds});
+
+        # use Data::Dumper; $mds_as_text = Dumper($fastinfo->{mclogmds});
+
         my $all = '';
-        foreach my $f (@{$fastinfo->{mclogmds}->{mclogmd}}) {
-          my $started = $f->{mcstartdate};
-          my $subtime = strftime "%Y%m%dT%H%M%SZ", gmtime $f->{mtime};
+        if ($fastinfo->{mclogmds}->{mclogmd}) {
+          foreach my $f (@{$fastinfo->{mclogmds}->{mclogmd}}) {
+            my $started = $f->{mcstartdate};
+            my $subtime = strftime "%Y%m%dT%H%M%SZ", gmtime $f->{mtime};
 
-          $all .= qq{
-          
-            <p> <b>$f->{file}</b>:
-                started: $started;
-                submitted: $subtime;
-                size: $f->{fsize} bytes
-            </p>
+            $all .= qq{
+            
+              <p> <b>$f->{file}</b>:
+                  started: $started;
+                  submitted: $subtime;
+                  size: $f->{fsize} bytes
+              </p>
 
-          };
+            };
+          }
         }
 
         $mds_as_text = qq{ <span class="mclogmds"> $all </span> };



Mime
View raw message