[Rt-commit] rt branch, 4.0/avoid-warnings-on-empty-search, created. rt-4.0.19-62-g384d255
Alex Vandiver
alexmv at bestpractical.com
Mon Mar 31 17:13:03 EDT 2014
The branch, 4.0/avoid-warnings-on-empty-search has been created
at 384d25581965cb0b92bb5fdb5c4f173a2d104f22 (commit)
- Log -----------------------------------------------------------------
commit 384d25581965cb0b92bb5fdb5c4f173a2d104f22
Author: Alex Vandiver <alexmv at bestpractical.com>
Date: Mon Mar 31 17:05:27 2014 -0400
Prevent uninitialized warnings on search result pages with no query
Fixes issues #29699
diff --git a/share/html/Search/Results.html b/share/html/Search/Results.html
index 601786f..3c3187c 100644
--- a/share/html/Search/Results.html
+++ b/share/html/Search/Results.html
@@ -111,7 +111,6 @@ if ( !defined($Rows) ) {
}
$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");
@@ -141,11 +140,10 @@ $session{'CurrentSearchHash'} = {
};
+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',
-----------------------------------------------------------------------
More information about the rt-commit
mailing list