[Rt-commit] rt branch, 4.0/inaccurate-search-result-number-when-redirect, created. rt-4.0.2-186-g01f1db5
? sunnavy
sunnavy at bestpractical.com
Tue Oct 11 03:24:21 EDT 2011
The branch, 4.0/inaccurate-search-result-number-when-redirect has been created
at 01f1db54cb7e5b81540c93af2d1e2f2457641d3c (commit)
- Log -----------------------------------------------------------------
commit 01f1db54cb7e5b81540c93af2d1e2f2457641d3c
Author: sunnavy <sunnavy at bestpractical.com>
Date: Tue Oct 11 15:22:10 2011 +0800
totalcount is not always precise
diff --git a/share/html/Search/Results.html b/share/html/Search/Results.html
index 7b20f44..71d6ffd 100755
--- a/share/html/Search/Results.html
+++ b/share/html/Search/Results.html
@@ -161,7 +161,10 @@ my $genpage = sub {
);
};
-if ( RT->Config->Get('SearchResultsAutoRedirect') && $ticketcount == 1 ) {
+if ( RT->Config->Get('SearchResultsAutoRedirect') && $ticketcount == 1 &&
+ $session{tickets}->First ) {
+# $ticketcount is not always precise unless $UseSQLForACLChecks is set to true,
+# check $session{tickets}->First here is to make sure the ticket is there.
RT::Interface::Web::Redirect( RT->Config->Get('WebURL')
."Ticket/Display.html?id=". $session{tickets}->First->id );
}
-----------------------------------------------------------------------
More information about the Rt-commit
mailing list