[Rt-commit] r3560 - in rt/branches/3.5-TESTING: . html/Search

trs at bestpractical.com trs at bestpractical.com
Fri Jul 29 17:38:58 EDT 2005


Author: trs
Date: Fri Jul 29 17:38:57 2005
New Revision: 3560

Modified:
   rt/branches/3.5-TESTING/   (props changed)
   rt/branches/3.5-TESTING/html/Search/Simple.html
Log:
 r5474 at wintermute:  tom | 2005-07-29 17:31:53 -0400
 Added a callback to allow modification of the query before the Googleish search gets it.


Modified: rt/branches/3.5-TESTING/html/Search/Simple.html
==============================================================================
--- rt/branches/3.5-TESTING/html/Search/Simple.html	(original)
+++ rt/branches/3.5-TESTING/html/Search/Simple.html	Fri Jul 29 17:38:57 2005
@@ -69,12 +69,15 @@
 my $title = loc("Search for tickets");
 use RT::Search::Googleish;
 
-if ( $ARGS{"q"}) {
+if ($q) {
     my $tickets = new RT::Tickets( $session{'CurrentUser'} );
-    my $search  = RT::Search::Googleish->new(Argument   => $ARGS{"q"},
-                                         TicketsObj => $tickets);
+    
+    $m->comp('/Elements/Callback', %ARGS, _CallbackName => 'ModifyQuery', query => \$q);
+    
+    my $search  = RT::Search::Googleish->new(Argument   => $q,
+                                             TicketsObj => $tickets);
 
-    $m->comp( "Results.html", Query   => $search->QueryToSQL());
+    $m->comp( "Results.html", Query => $search->QueryToSQL() );
     $m->comp( "/Elements/Footer" );
     $m->abort();
 }


More information about the Rt-commit mailing list