remove some early testing cruft autosuggest-scratch
authorLebbeous Fogle-Weekley <lebbeous@esilibrary.com>
Tue, 20 Dec 2011 18:48:41 +0000 (13:48 -0500)
committerLebbeous Fogle-Weekley <lebbeous@esilibrary.com>
Tue, 3 Jan 2012 22:41:43 +0000 (17:41 -0500)
Signed-off-by: Lebbeous Fogle-Weekley <lebbeous@esilibrary.com>
Open-ILS/src/perlmods/lib/OpenILS/WWW/AutoSuggest.pm

index d1021ac..1116437 100644 (file)
@@ -11,57 +11,16 @@ use Apache2::RequestIO ();
 use Apache2::RequestUtil;
 use CGI;
 
-my @dict = qw/
-    alpha
-    allstate
-    apple
-    appropriate
-    application
-    arizona
-    bears
-    beta
-    beets
-    gamma
-    gone
-    out
-    tool
-    toad
-    tap
-    sock
-    socket
-    sicken
-    sickening
-    rage
-    right
-    road
-    /;
-
-sub search_dict {
-    my $term = shift;
-    (my $re = $term) =~ s/[^a-z0-9]/\./gi;
-
-    return ($term, grep(/^$re/, @dict));
-}
 
 sub handler {
     my $r = shift;
     my $cgi = new CGI;
 
-    my ($term, @matches) = search_dict($cgi->param("query"));
-    my $xml_terms = join("\n", map {
-        qq{<val term="$term" field="123">$_</val>}
-    } @matches);
     print "Content-type: application/xml; charset=utf-8\n\n";
 
-    print qq{<?xml version="1.0"?>
-<as>
-$xml_terms
-</as>
-    };
+    print qq{<?xml version="1.0"?> <as> </as> \n};
     
     return Apache2::Const::OK;
 }
 
 1;
-
-# vim: et:ts=4:sw=4