[Rt-commit] r3456 - in rt/branches/3.5-TESTING: . html html/Elements

trs at bestpractical.com trs at bestpractical.com
Sat Jul 9 22:22:06 EDT 2005


Author: trs
Date: Sat Jul  9 22:22:05 2005
New Revision: 3456

Modified:
   rt/branches/3.5-TESTING/   (props changed)
   rt/branches/3.5-TESTING/html/Elements/SimpleSearch
   rt/branches/3.5-TESTING/html/index.html
Log:
 r4971 at wintermute:  tom | 2005-07-09 21:28:48 -0400
 Update the SimpleSearch form and index.html to use the true simple search in Search/Simple.html


Modified: rt/branches/3.5-TESTING/html/Elements/SimpleSearch
==============================================================================
--- rt/branches/3.5-TESTING/html/Elements/SimpleSearch	(original)
+++ rt/branches/3.5-TESTING/html/Elements/SimpleSearch	Sat Jul  9 22:22:05 2005
@@ -43,7 +43,7 @@
 %# those contributions and any derivatives thereof.
 %# 
 %# END BPS TAGGED BLOCK }}}
-<form action="<% $RT::WebPath %>/index.html">
+<form action="<% $RT::WebPath %>/Search/Simple.html">
   <input size="12" name="q" autocomplete="off" accesskey="0" class="field" />
   <input type="submit" class="button" value="<&|/l&>Search</&>" />
 </form>

Modified: rt/branches/3.5-TESTING/html/index.html
==============================================================================
--- rt/branches/3.5-TESTING/html/index.html	(original)
+++ rt/branches/3.5-TESTING/html/index.html	Sat Jul  9 22:22:05 2005
@@ -95,42 +95,8 @@
 
 
 if ( $ARGS{'q'} ) {
-    my $query = $ARGS{'q'};
-
-   if ( $query =~ m/^\s*(\d+)\s*$/ ) {
-        $m->comp("/Ticket/Display.html" , id=> $1);
-        return();
-    }
-
-    if ($m->comp('/Elements/Callback', _CallbackName => 'SearchPreFilter', 
-		 query => $query, %ARGS)) {
-	return();
-    }
-
-    $session{'tickets'} = RT::Tickets->new( $session{'CurrentUser'} );
-
-    if ( $query =~ m/\@/ ) {
-        $m->comp("/Search/Results.html", Query => "Requestor = '$query'");
-
-        return();
-    }
-
-    #
-    # Any search on queue name or subject will be for new/open tickets
-    # only.
-    #
-
-    my $status = "Status = 'new' OR Status = 'open'";
-
-    my $queue = RT::Queue->new( $session{'CurrentUser'} );
-    if ( $queue->Load($query) && $queue->Id ) {
-        $m->comp("/Search/Results.html", Query => "Queue = '" . $queue->Id . "' AND ($status)");
-        return();
-    }
-
-    $m->comp("/Search/Results.html", Query => "Subject LIKE '$query' AND ($status)");
-    return();
-
+    $m->redirect($RT::WebURL."Search/Simple.html?q=".$m->interp->apply_escapes($ARGS{q}));
+    $m->abort;
 }
 
 if ($ARGS{'HomeRefreshInterval'}) {


More information about the Rt-commit mailing list