[Rt-commit] rt branch, 3.9-trunk, updated. rt-3.8.8-178-g49de5af
? sunnavy
sunnavy at bestpractical.com
Wed Jul 21 01:14:16 EDT 2010
The branch, 3.9-trunk has been updated
via 49de5af1ea266222b837fcb198002eac28f75ba5 (commit)
from 409adf7af3e1949ab2986fa36780d4090f67f3da (commit)
Summary of changes:
lib/RT/Config.pm | 12 +++++++-----
1 files changed, 7 insertions(+), 5 deletions(-)
- Log -----------------------------------------------------------------
commit 49de5af1ea266222b837fcb198002eac28f75ba5
Author: sunnavy <sunnavy at bestpractical.com>
Date: Wed Jul 21 13:15:55 2010 +0800
no hardcode lists for config
diff --git a/lib/RT/Config.pm b/lib/RT/Config.pm
index 2cf66f3..b00e07d 100644
--- a/lib/RT/Config.pm
+++ b/lib/RT/Config.pm
@@ -1003,19 +1003,21 @@ sub UpdateOption {
@_
);
- unless ( $args{Name} ) {
+ my $name = delete $args{Name};
+
+ unless ( $name ) {
$RT::Logger->error("Need Name to update a new config");
return;
}
- unless ( exists $META{ $args{Name} } ) {
- $RT::Logger->error("Config $args{Name} doesn't exist");
+ unless ( exists $META{$name} ) {
+ $RT::Logger->error("Config $name doesn't exist");
return;
}
- for my $type (qw/Section Overridable SortOrder Widget WidgetArguments/) {
+ for my $type ( keys %args ) {
next unless defined $args{$type};
- $META{ $args{Name} }{$type} = $args{$type};
+ $META{$name}{$type} = $args{$type};
}
return 1;
}
-----------------------------------------------------------------------
More information about the Rt-commit
mailing list