[Rt-commit] rt branch, admin_ui, updated. c195618ca79dbac683f6240af320c068b3de7d40
sunnavy at bestpractical.com
sunnavy at bestpractical.com
Thu Jan 28 03:44:22 EST 2010
The branch, admin_ui has been updated
via c195618ca79dbac683f6240af320c068b3de7d40 (commit)
from b85c7246b49a2c6ad4184adb2f5f180b02e53408 (commit)
Summary of changes:
lib/RT/Action/EditUserPrefsQuickSearch.pm | 23 ++++++++++-------------
1 files changed, 10 insertions(+), 13 deletions(-)
- Log -----------------------------------------------------------------
commit c195618ca79dbac683f6240af320c068b3de7d40
Author: sunnavy <sunnavy at bestpractical.com>
Date: Thu Jan 28 16:44:15 2010 +0800
queues may not be submitted at all if it is unchecked for all
diff --git a/lib/RT/Action/EditUserPrefsQuickSearch.pm b/lib/RT/Action/EditUserPrefsQuickSearch.pm
index a7dc526..f096bd0 100644
--- a/lib/RT/Action/EditUserPrefsQuickSearch.pm
+++ b/lib/RT/Action/EditUserPrefsQuickSearch.pm
@@ -33,20 +33,17 @@ use Jifty::Action schema {
sub take_action {
my $self = shift;
- if ( $self->has_argument('queues') ) {
- my $wants = $self->argument_value('queues');
- $wants = [$wants] unless ref $wants eq 'ARRAY';
- my %wants = map { $_ => 1 } ref $wants eq 'ARRAY' ? @$wants : $wants;
- my %unwanted =
- map { $_ => 1 } grep { !$wants{$_} } map { $_->name } $self->queues;
- my ( $status, $msg ) =
- $self->user->set_preferences( $self->name, \%unwanted );
- Jifty->log->error($msg) unless $status;
+ my $wants = $self->argument_value('queues') || [];
+ my %wants = map { $_ => 1 } ref $wants eq 'ARRAY' ? @$wants : $wants;
+ my %unwanted =
+ map { $_ => 1 } grep { !$wants{$_} } map { $_->name } $self->queues;
+ my ( $status, $msg ) =
+ $self->user->set_preferences( $self->name, \%unwanted );
+ Jifty->log->error($msg) unless $status;
- # Let QueueSummary rebuild the cache
- Jifty->web->session->remove('quick_search_queues');
- $self->report_success;
- }
+ # Let QueueSummary rebuild the cache
+ Jifty->web->session->remove('quick_search_queues');
+ $self->report_success;
return 1;
}
-----------------------------------------------------------------------
More information about the Rt-commit
mailing list