spamassassin-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From j.@apache.org
Subject svn commit: r711223 - /spamassassin/trunk/masses/rule-qa/automc/ruleqa.cgi
Date Tue, 04 Nov 2008 11:05:32 GMT
Author: jm
Date: Tue Nov  4 03:05:31 2008
New Revision: 711223

URL: http://svn.apache.org/viewvc?rev=711223&view=rev
Log:
ruleQA: when using the q= shortcut URL, e.g. http://ruleqa.spamassassin.org?q=RULE_NAME ,
some of the links were invalid.  fix

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

Modified: spamassassin/trunk/masses/rule-qa/automc/ruleqa.cgi
URL: http://svn.apache.org/viewvc/spamassassin/trunk/masses/rule-qa/automc/ruleqa.cgi?rev=711223&r1=711222&r2=711223&view=diff
==============================================================================
--- spamassassin/trunk/masses/rule-qa/automc/ruleqa.cgi (original)
+++ spamassassin/trunk/masses/rule-qa/automc/ruleqa.cgi Tue Nov  4 03:05:31 2008
@@ -152,6 +152,11 @@
   my $q = $self->{q}->param("q");
   if ($q) {
     $self->{q}->param(-name=>"rule", -value=>$q);
+
+    # ensure links from here include this
+    $self->{cgi_params}{"rule"} = "rule=".uri_escape($q);
+    push @{$self->{cgi_param_order}}, "rule";
+
     $self->{s}{detail} = 1;
   }
 
@@ -1201,6 +1206,7 @@
   my $href = $self->assemble_url(
             "mclog=".(($isspam ? "spam" : "ham")."-".$who),
             "rule=".$line->{name},
+           "daterev=".$self->{daterev},
             $self->get_params_except(qw( mclog rule s_detail )));
 
   return qq{
@@ -1423,7 +1429,10 @@
   my @parms =  $self->get_params_except($switch);
   $newval ||= '';
   if (!defined $switch) { warn "switch '$switch'='$newval' undef value"; }
-  push (@parms, $switch."=".$newval);
+  push (@parms,
+        $switch."=".$newval,
+        "daterev=".$self->{daterev}
+       );
   return $self->assemble_url(@parms);
 }
 



Mime
View raw message