[Rt-devel] Re: [PATCH] (#4638) cli cookie handling

Abhijit Menon-Sen ams at wiw.org
Thu May 6 23:17:02 EDT 2004


At 2004-05-07 08:23:51 +0530, ams at wiw.org wrote:
>
> The correct fix for this is the one I sent to rt-bugs@ on 2003-12-29,
> in <20031229082831.A4759 at lustre.dyn.wiw.org>.

Not quite. The code has drifted a bit since then.
How about something like the appended patch instead?

-- ams

Index: bin/rt.in
===================================================================
--- bin/rt.in	(revision 851)
+++ bin/rt.in	(working copy)
@@ -195,10 +195,12 @@
 
 sub list {
     my ($q, $type, %data);
-    $orderby = $config{orderby};
-    
     my $bad = 0;
 
+    if ($config{orderby}) {
+        $data{orderby} = $config{orderby};
+    }
+
     while (@ARGV) {
         $_ = shift @ARGV;
 
@@ -231,9 +233,8 @@
         }
     }
     
-    if (!defined $q)
-    {
-        $q = $config{query} ; 
+    if (!defined $q) {
+        $q = $config{query}; 
     }
     
     $type ||= "ticket";
@@ -244,7 +245,7 @@
     }
     return help("list", $type) if $bad;
 
-    my $r = submit("$REST/search/$type", { query => $q, %data, orderby => $data{orderby} || "" });
+    my $r = submit("$REST/search/$type", { query => $q, %data });
     print $r->content;
 }
 


More information about the Rt-devel mailing list