[Rt-commit] r10625 - in rt/branches/3.999-DANGEROUS: lib/RT/Interface/Web/QueryBuilder

ruz at bestpractical.com ruz at bestpractical.com
Thu Jan 31 13:40:40 EST 2008


Author: ruz
Date: Thu Jan 31 13:40:40 2008
New Revision: 10625

Modified:
   rt/branches/3.999-DANGEROUS/html/Search/Build.html
   rt/branches/3.999-DANGEROUS/lib/RT/Interface/Web/QueryBuilder/Tree.pm

Log:
* fix the QB, so it at least showed

Modified: rt/branches/3.999-DANGEROUS/html/Search/Build.html
==============================================================================
--- rt/branches/3.999-DANGEROUS/html/Search/Build.html	(original)
+++ rt/branches/3.999-DANGEROUS/html/Search/Build.html	Thu Jan 31 13:40:40 2008
@@ -167,7 +167,7 @@
     my ($string, $results) = @_;
 
     my $tree = RT::Interface::Web::QueryBuilder::Tree->new('AND');
-    @$results = $tree->parse_sql( Query => $string );
+    @$results = $tree->parse_sql( query => $string );
 
     return $tree;
 };

Modified: rt/branches/3.999-DANGEROUS/lib/RT/Interface/Web/QueryBuilder/Tree.pm
==============================================================================
--- rt/branches/3.999-DANGEROUS/lib/RT/Interface/Web/QueryBuilder/Tree.pm	(original)
+++ rt/branches/3.999-DANGEROUS/lib/RT/Interface/Web/QueryBuilder/Tree.pm	Thu Jan 31 13:40:40 2008
@@ -236,10 +236,10 @@
 sub parse_sql {
     my $self = shift;
     my %args = (
-        Query => '',
+        query => '',
         @_
     );
-    my $string = $args{'Query'};
+    my $string = $args{'query'};
 
     my @results;
 
@@ -261,7 +261,7 @@
 
         my $class;
         if ( exists $lcfield{ lc $main_key } ) {
-            $class = $field{$main_key}->[0];
+            $class = $field{ $lcfield{ lc $main_key } }->[0];
             $key =~ s/^[^.]+/ $lcfield{ lc $main_key } /e;
         }
         unless ($class) {


More information about the Rt-commit mailing list