[Rt-commit] r4622 - in rt/branches/3.7-EXPERIMENTAL: .
alexmv at bestpractical.com
alexmv at bestpractical.com
Wed Mar 1 15:47:54 EST 2006
Author: alexmv
Date: Wed Mar 1 15:47:54 2006
New Revision: 4622
Modified:
rt/branches/3.7-EXPERIMENTAL/ (props changed)
rt/branches/3.7-EXPERIMENTAL/html/Prefs/Search.html
rt/branches/3.7-EXPERIMENTAL/html/Prefs/SearchOptions.html
Log:
r9399 at zoq-fot-pik: chmrr | 2006-03-01 15:47:36 -0500
* Multiple OrderBy searches
Modified: rt/branches/3.7-EXPERIMENTAL/html/Prefs/Search.html
==============================================================================
--- rt/branches/3.7-EXPERIMENTAL/html/Prefs/Search.html (original)
+++ rt/branches/3.7-EXPERIMENTAL/html/Prefs/Search.html Wed Mar 1 15:47:54 2006
@@ -85,6 +85,8 @@
$title .= loc ($search->Description, loc ('"N"'));
my $user = $session{'CurrentUser'}->UserObj;
my $SearchArg = $user->Preferences($search, $search->Content);
+$ARGS{Order} = (ref $ARGS{Order} ? join('|',grep {/\S/} @{$ARGS{Order}}) : $ARGS{Order});
+$ARGS{OrderBy} = (ref $ARGS{OrderBy} ? join('|',grep {/\S/} @{$ARGS{OrderBy}}) : $ARGS{OrderBy});
for (@fields) {
$ARGS{$_} = $SearchArg->{$_} unless defined $ARGS{$_};
}
Modified: rt/branches/3.7-EXPERIMENTAL/html/Prefs/SearchOptions.html
==============================================================================
--- rt/branches/3.7-EXPERIMENTAL/html/Prefs/SearchOptions.html (original)
+++ rt/branches/3.7-EXPERIMENTAL/html/Prefs/SearchOptions.html Wed Mar 1 15:47:54 2006
@@ -65,13 +65,15 @@
# {{{ If we're saving search preferences, do that now
+$Order = (ref $Order ? join('|',grep {/\S/} @{$Order}) : $Order);
+$OrderBy = (ref $OrderBy ? join('|',grep {/\S/} @{$OrderBy}) : $OrderBy);
if ($ARGS{'SavePreferences'}) {
$session{'CurrentUser'}->UserObj->SetPreferences("SearchDisplay",
{
- Format => $ARGS{'Format'},
- Order => $ARGS{'Order'},
- OrderBy => $ARGS{'OrderBy'},
- RowsPerPage => $ARGS{'RowsPerPage'}
+ Format => $Format,
+ Order => $Order,
+ OrderBy => $OrderBy,
+ RowsPerPage => $RowsPerPage,
});
}
@@ -81,8 +83,8 @@
my $prefs = $session{'CurrentUser'}->UserObj->Preferences("SearchDisplay") || {};
$Format ||= $prefs->{'Format'};
-$Order ||= $prefs->{'Order'} || 'ASC';
-$OrderBy ||= $prefs->{'OrderBy'} || 'id';
+$Order ||= ($prefs->{'Order'} || 'ASC');
+$OrderBy ||= ($prefs->{'OrderBy'} || 'id');
($RowsPerPage = defined( $prefs->{'RowsPerPage'}) ? $prefs->{'RowsPerPage'} : 50) unless defined ($RowsPerPage);
my ( $AvailableColumns, $CurrentFormat );
More information about the Rt-commit
mailing list