[Rt-commit] r3243 - in rt/branches/3.4-RELEASE: . html/Elements
David Glasser
glasser at bestpractical.com
Sat Aug 13 02:25:49 EDT 2005
A post on rt-users seems to imply that this patch was wrong -- what
were you trying to fix here? It looks to me like we just wanted to
backslash-escape single quotes (and backslashes)?
--dave
On Jun 23, 2005, at 4:58 PM, alexmv at bestpractical.com wrote:
> Author: alexmv
> Date: Thu Jun 23 16:58:14 2005
> New Revision: 3243
>
> Modified:
> rt/branches/3.4-RELEASE/ (props changed)
> rt/branches/3.4-RELEASE/html/Elements/Quicksearch
> Log:
> r4469 at zoq-fot-pik: chmrr | 2005-06-23 17:00:09 -0400
> * Escape queue name properly
>
>
> Modified: rt/branches/3.4-RELEASE/html/Elements/Quicksearch
> ======================================================================
> ========
> --- rt/branches/3.4-RELEASE/html/Elements/Quicksearch (original)
> +++ rt/branches/3.4-RELEASE/html/Elements/Quicksearch Thu Jun 23
> 16:58:14 2005
> @@ -55,22 +55,22 @@
> <%PERL>
> my $i;
> while (my $queue = $Queues->Next) {
> - next unless ($queue->CurrentUserHasRight('ShowTicket'));
> + next unless ($queue->CurrentUserHasRight('ShowTicket'));
>
> - my $new_q = "Queue = '".$queue->Name."' AND Status = 'new'";
> - my $open_q = "Queue = '".$queue->Name."' AND Status =
> 'open'";
> - my $all_q = "Queue = '".$queue->Name."' AND (Status =
> 'open' OR Status = 'new')";
> -
> - $Tickets->FromSQL($open_q);
> - my $open = $Tickets->Count();
> -
> - $Tickets->FromSQL($new_q);
> - my $new = $Tickets->Count();
> + my $name = $m->interp->apply_escapes($queue->Name, "u");
> +
> + my $new_q = "Queue = '".$queue->Name."' AND Status = 'new'";
> + my $open_q = "Queue = '".$queue->Name."' AND Status = 'open'";
> + my $all_q = "Queue = '".$queue->Name."' AND (Status = 'open' OR
> Status = 'new')";
>
> + $Tickets->FromSQL($open_q);
> + my $open = $Tickets->Count();
>
> + $Tickets->FromSQL($new_q);
> + my $new = $Tickets->Count();
>
> + $i++;
> </%PERL>
> -% $i++;
> <TR class="<% $i%2 ? 'oddline' : 'evenline'%>" >
> <td><A HREF="<% $RT::WebPath%>/Search/Results.html?Query=<%$all_q%
> >&Rows=50" TITLE="<% $queue->Description %>"><%$queue->Name%></a></TD>
> <td align="right"><A HREF="<% $RT::WebPath%>/Search/Results.html?
> Query=<%$new_q%>&Rows=50"><%$new%></a></TD>
> _______________________________________________
> Rt-commit mailing list
> Rt-commit at lists.bestpractical.com
> http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-commit
>
--dave
Code Monkey, Best Practical Solutions
--
David Glasser | glasser at bestpractical.com
More information about the Rt-commit
mailing list