[prev in list] [next in list] [prev in thread] [next in thread]
List: rt-commit
Subject: [Rt-commit] rt branch, 4.0/avoid-warnings-on-empty-search, created. rt-4.0.19-62-g384d255
From: alexmv () bestpractical ! com (Alex Vandiver)
Date: 2014-03-31 21:13:03
Message-ID: 20140331211303.9C94E2418005 () booth ! bestpractical ! com
[Download RAW message or body]
The branch, 4.0/avoid-warnings-on-empty-search has been created
at 384d25581965cb0b92bb5fdb5c4f173a2d104f22 (commit)
- Log -----------------------------------------------------------------
commit 384d25581965cb0b92bb5fdb5c4f173a2d104f22
Author: Alex Vandiver <alexmv@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',
-----------------------------------------------------------------------
_______________________________________________
rt-commit mailing list
rt-commit@lists.bestpractical.com
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-commit
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic