[Rt-commit] [rtir] 02/03: Reduce our extra Query Args when pulling from the session.
Kevin Falcone
falcone at bestpractical.com
Mon Jul 22 20:45:21 EDT 2013
This is an automated email from the git hooks/post-receive script.
falcone pushed a commit to branch 3.0.0-releng
in repository rtir.
commit cd3cfa86ddaaa9f948a43d716e727777dd098a4c
Author: Kevin Falcone <falcone at bestpractical.com>
Date: Mon Jul 22 19:11:47 2013 -0400
Reduce our extra Query Args when pulling from the session.
As discovered by sunnavy when he went spelunking to determine why
t/walk-web.t started running so many extra tests (7a630ac1), we were
stuffing a bunch of extra query params into the query string,
depending on whether we did that from the hash or passed args (things
like Object and Description).
I rewrote his patch a bit to use the same Field list as search_arguments
We lose saved search state badly in RTIR, but it's not a regression
caused by this code, see [rtir #25241]
---
html/Callbacks/RTIR/Elements/Tabs/Privileged | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/html/Callbacks/RTIR/Elements/Tabs/Privileged b/html/Callbacks/RTIR/Elements/Tabs/Privileged
index 2ed524b..80b92bf 100644
--- a/html/Callbacks/RTIR/Elements/Tabs/Privileged
+++ b/html/Callbacks/RTIR/Elements/Tabs/Privileged
@@ -56,10 +56,11 @@ my $query_string = sub {
my $args = $DECODED_ARGS;
+my @query_fields = qw(Query Format RowsPerPage Page OrderBy Order);
+
my $search_arguments = sub {
my %res = ();
my $caller_args = $m->caller_args(1);
- my @query_fields = qw(Query Format RowsPerPage Page OrderBy Order);
if ( $caller_args->{'SearchArgs'} ) {
@res{ @query_fields } = @{ $caller_args->{'SearchArgs'} }{ @query_fields };
} else {
@@ -75,7 +76,7 @@ my $search = $root->child( search => title => loc('Search'), path => '/RTIR/Sear
$search->child( new => title => loc('New Search'), path => '/RTIR/Search/?NewQuery=1' );
{
-my $current_search = $session{"CurrentSearchHash"} || {};
+my $current_search = $session{'CurrentSearchHash'} ? { map { $_ => $session{'CurrentSearchHash'}{$_} } @query_fields } : {};
my $has_query = 1 if ( $args->{'Query'} or $current_search->{'Query'} );
if ( $has_query ) {
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Rt-commit
mailing list