[Rt-commit] r4980 - in rt/branches/3.7-EXPERIMENTAL: .
ruz at bestpractical.com
ruz at bestpractical.com
Wed Apr 5 13:41:46 EDT 2006
Author: ruz
Date: Wed Apr 5 13:41:45 2006
New Revision: 4980
Modified:
rt/branches/3.7-EXPERIMENTAL/ (props changed)
rt/branches/3.7-EXPERIMENTAL/html/Search/Build.html
Log:
r2346 at cubic-pc: cubic | 2006-04-05 17:46:24 +0400
* fetch query info from form arguments first, then init saved searches,
this could override query hash while Load or Revert operations,
and only then load missing parts from user's preferences
* don't use 'comp&abort' technique to show different page instead of current,
but use 'return comp', in the second case we shouldn't care about footer.
When we use abort we drop footer and other subcequent components.
Modified: rt/branches/3.7-EXPERIMENTAL/html/Search/Build.html
==============================================================================
--- rt/branches/3.7-EXPERIMENTAL/html/Search/Build.html (original)
+++ rt/branches/3.7-EXPERIMENTAL/html/Search/Build.html Wed Apr 5 13:41:45 2006
@@ -117,7 +117,12 @@
my $title = loc("Query Builder");
-my (%query, %saved_search);
+my %query;
+for( qw(Query Format OrderBy Order RowsPerPage) ) {
+ $query{$_} = $ARGS{$_};
+}
+
+my %saved_search;
my @actions = $m->comp( 'Elements/EditSearches:Init', %ARGS, Query => \%query, SavedSearch => \%saved_search);
if ( $NewQuery ) {
@@ -141,7 +146,6 @@
my $default = { Query => '', Format => '', OrderBy => 'id', Order => 'ASC', RowsPerPage => 50 };
for( qw(Query Format OrderBy Order RowsPerPage) ) {
- $query{$_} = $ARGS{$_};
$query{$_} = $current->{$_} unless defined $query{$_};
$query{$_} = $prefs->{$_} unless defined $query{$_};
$query{$_} = $default->{$_} unless defined $query{$_};
@@ -201,9 +205,7 @@
# if parsing went poorly, send them to the edit page to fix it
if ( $actions[0] ) {
- $m->comp( "Edit.html", Query => $query{'Query'}, actions => \@actions );
- $m->comp('/Elements/Footer');
- $m->abort;
+ return $m->comp( "Edit.html", Query => $query{'Query'}, actions => \@actions );
}
my @options = $tree->GetDisplayedNodes;
More information about the Rt-commit
mailing list