[Rt-commit] r7053 - in rt/branches/3.7-EXPERIMENTAL-RTIR-2.2: .
ruz at bestpractical.com
ruz at bestpractical.com
Thu Feb 22 18:49:51 EST 2007
Author: ruz
Date: Thu Feb 22 18:49:51 2007
New Revision: 7053
Modified:
rt/branches/3.7-EXPERIMENTAL-RTIR-2.2/ (props changed)
rt/branches/3.7-EXPERIMENTAL-RTIR-2.2/html/Elements/ShowSearch
Log:
r4604 at cubic-pc (orig r7040): ruz | 2007-02-21 04:30:13 +0300
* fix a bug with saved searches on rt at glance when summary rows preference
and rows per page of the search are different values
* run callback a little bit earlier
Modified: rt/branches/3.7-EXPERIMENTAL-RTIR-2.2/html/Elements/ShowSearch
==============================================================================
--- rt/branches/3.7-EXPERIMENTAL-RTIR-2.2/html/Elements/ShowSearch (original)
+++ rt/branches/3.7-EXPERIMENTAL-RTIR-2.2/html/Elements/ShowSearch Thu Feb 22 18:49:51 2007
@@ -44,11 +44,11 @@
%#
%# END BPS TAGGED BLOCK }}}
<&|/Widgets/TitleBox,
- title => loc($search->Description, $SearchArg->{'Rows'}),
+ title => loc($search->Description, $ProcessedSearchArg->{'Rows'}),
title_href => $query_link_url.$QueryString,
titleright => $customize ? loc('Edit') : '',
titleright_href => $customize &>
-<& $query_display_component, %$SearchArg, ShowNavigation => 0 &>
+<& $query_display_component, %$ProcessedSearchArg, ShowNavigation => 0 &>
</&>
<%init>
my $search;
@@ -95,19 +95,24 @@
. $m->comp( '/Elements/QueryString', name => ref($search) . '-' . $search->Id );
}
-$SearchArg = { %$SearchArg, %Override } if keys %Override;
-
-$SearchArg->{'Query'} =~ s/__CurrentUser__/$session{'CurrentUser'}->Id/ge;
-$SearchArg->{'Format'} =~ s/__(Web(?:Path|Base|BaseURL))__/RT->Config->Get($1)/ge;
-$SearchArg->{'Format'} =~ s/__loc\(["']?(\w+)["']?\)__/loc("$1")/ge;
+# ProcessedSearchArg is a search with overridings, but for link we use
+# orginal search's poperties
+my $ProcessedSearchArg = $SearchArg;
+$ProcessedSearchArg = { %$SearchArg, %Override } if keys %Override;
$m->comp(
- '/Elements/Callback',
- _CallbackName => 'ModifySearch',
- Search => $SearchArg,
- %ARGS
+ '/Elements/Callback', %ARGS,
+ _CallbackName => 'ModifySearch',
+ OriginalSearch => $SearchArg,
+ Search => $ProcessedSearchArg,
);
+foreach ( $SearchArg, $ProcessedSearchArg ) {
+ $_->{'Query'} =~ s/__CurrentUser__/$session{'CurrentUser'}->Id/ge;
+ $_->{'Format'} =~ s/__(Web(?:Path|Base|BaseURL))__/scalar RT->Config->Get($1)/ge;
+ $_->{'Format'} =~ s/__loc\(["']?(\w+)["']?\)__/loc("$1")/ge;
+}
+
my $QueryString = '?' . $m->comp( '/Elements/QueryString', %$SearchArg );
</%init>
More information about the Rt-commit
mailing list