%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2015 Best Practical Solutions, LLC
%# <sales@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
% $m->callback( ARGSRef => \%ARGS, CallbackName => 'BeforeResults' );
+% unless ($ok) {
+% $msg =~ s{ at .*? line .*}{}s;
+<&| /Widgets/TitleBox, title => loc("Error"), class => "error" &>
+<&|/l_unsafe, "<i>".$m->interp->apply_escapes($msg, "h")."</i>" &>There was an error parsing your search query: [_1]. Your RT admin can find more information in the error logs.</&>
+</&>
+% } else {
+
<& /Elements/CollectionList,
Query => $Query,
TotalFound => $ticketcount,
BaseURL => $BaseURL
&>
+% }
% $m->callback( ARGSRef => \%ARGS, CallbackName => 'AfterResults' );
% my %hiddens = (Query => $Query, Format => $Format, Rows => $Rows, OrderBy => $OrderBy, Order => $Order, HideResults => $HideResults, Page => $Page, SavedChartSearchId => $SavedChartSearchId );
}
$Page = 1 unless $Page && $Page > 0;
-my ($title, $ticketcount);
$session{'i'}++;
$session{'tickets'} = RT::Tickets->new($session{'CurrentUser'}) ;
my ($ok, $msg) = $Query ? $session{'tickets'}->FromSQL($Query) : (1, "Vacuously OK");
};
+my ($title, $ticketcount) = (loc("Found tickets"), 0);
if ( $session{'tickets'}->Query()) {
$ticketcount = $session{tickets}->CountAll();
$title = loc('Found [quant,_1,ticket]', $ticketcount);
-} else {
- $title = loc("Find tickets");
}
my $QueryString = "?".$m->comp('/Elements/QueryString',