[Rt-commit] r12924 - in rt/branches/3.8-TESTING: lib/RT/Interface/Web/QueryBuilder share/html/Elements share/html/Search

alexmv at bestpractical.com alexmv at bestpractical.com
Thu Jun 5 14:37:09 EDT 2008


Author: alexmv
Date: Thu Jun  5 14:37:09 2008
New Revision: 12924

Modified:
   rt/branches/3.8-TESTING/   (props changed)
   rt/branches/3.8-TESTING/lib/RT/Interface/Web/QueryBuilder/Tree.pm
   rt/branches/3.8-TESTING/share/html/Elements/QueueSummary
   rt/branches/3.8-TESTING/share/html/Search/Build.html

Log:
 r32604 at kohr-ah:  chmrr | 2008-06-05 14:37:03 -0400
  * Fixups for queues qith apostrophes in them


Modified: rt/branches/3.8-TESTING/lib/RT/Interface/Web/QueryBuilder/Tree.pm
==============================================================================
--- rt/branches/3.8-TESTING/lib/RT/Interface/Web/QueryBuilder/Tree.pm	(original)
+++ rt/branches/3.8-TESTING/lib/RT/Interface/Web/QueryBuilder/Tree.pm	Thu Jun  5 14:37:09 2008
@@ -266,6 +266,7 @@
             push @results, [ $args{'CurrentUser'}->loc("Unknown field: [_1]", $key), -1 ]
         }
 
+        $value =~ s/'/\\'/g;
         $value = "'$value'" if $value =~ /[^0-9]/;
         $key = "'$key'" if $key =~ /^CF./;
 

Modified: rt/branches/3.8-TESTING/share/html/Elements/QueueSummary
==============================================================================
--- rt/branches/3.8-TESTING/share/html/Elements/QueueSummary	(original)
+++ rt/branches/3.8-TESTING/share/html/Elements/QueueSummary	Thu Jun  5 14:37:09 2008
@@ -55,7 +55,9 @@
 % my $i;
 % for my $queue (@queues) {
 %   $i++;
-%   my $queue_cond = "Queue = '$queue->{Name}' AND ";
+%   my $name = $queue->{Name};
+%   $name =~ s/'/\\'/g;
+%   my $queue_cond = "Queue = '$name' AND ";
 %   my $all_q = $queue_cond . "(Status = 'open' OR Status = 'new' OR Status = 'stalled')";
 <tr class="<% $i%2 ? 'oddline' : 'evenline'%>" >
 <td><a href="<% RT->Config->Get('WebPath') %>/Search/Results.html?Query=<% $all_q |u,n %>" title="<% $queue->{Description} %>"><% $queue->{Name} %></a></td>

Modified: rt/branches/3.8-TESTING/share/html/Search/Build.html
==============================================================================
--- rt/branches/3.8-TESTING/share/html/Search/Build.html	(original)
+++ rt/branches/3.8-TESTING/share/html/Search/Build.html	Thu Jun  5 14:37:09 2008
@@ -227,6 +227,7 @@
             $value = "'NULL'";
         }
         else {
+            $value =~ s/'/\\'/g;
             $value = "'$value'" unless $value =~ /^\d+$/;
         }
 


More information about the Rt-commit mailing list