[Rt-commit] r7040 - rt/branches/3.6-RELEASE/html/Elements
ruz at bestpractical.com
ruz at bestpractical.com
Tue Feb 20 20:30:14 EST 2007
Author: ruz
Date: Tue Feb 20 20:30:13 2007
New Revision: 7040
Modified:
rt/branches/3.6-RELEASE/html/Elements/ShowSearch
Log:
* 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.6-RELEASE/html/Elements/ShowSearch
==============================================================================
--- rt/branches/3.6-RELEASE/html/Elements/ShowSearch (original)
+++ rt/branches/3.6-RELEASE/html/Elements/ShowSearch Tue Feb 20 20:30:13 2007
@@ -44,13 +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;
@@ -98,19 +96,24 @@
name => ref($search) . '-' . $search->Id );
}
-$SearchArg = { %$SearchArg, %Override } if keys %Override;
-
-$SearchArg->{'Query'} =~ s/__CurrentUser__/$session{'CurrentUser'}->Id/ge;
-$SearchArg->{'Format'} =~ s/__WebPath__/$RT::WebPath/g;
-$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/__WebPath__/$RT::WebPath/g;
+ $_->{'Format'} =~ s/__loc\(["']?(\w+)["']?\)__/loc("$1")/ge;
+}
+
my $QueryString = '?' . $m->comp( '/Elements/QueryString', %$SearchArg );
</%init>
More information about the Rt-commit
mailing list