[Rt-commit] rt branch, 3.9-hash_config_options, created. rt-3.9.4-244-g0f6ccfd
Ruslan Zakirov
ruz at bestpractical.com
Wed Nov 3 02:08:23 EDT 2010
The branch, 3.9-hash_config_options has been created
at 0f6ccfda8a10b8a6b2b8b449883f1a97d52dbb7a (commit)
- Log -----------------------------------------------------------------
commit 0f6ccfda8a10b8a6b2b8b449883f1a97d52dbb7a
Author: Ruslan Zakirov <ruz at bestpractical.com>
Date: Wed Nov 3 07:58:02 2010 +0300
use simple merge for HASH options
RT site config wins, then core config, then extension site config,
then extension core config
diff --git a/lib/RT/Config.pm b/lib/RT/Config.pm
index 1a3932f..63247e8 100644
--- a/lib/RT/Config.pm
+++ b/lib/RT/Config.pm
@@ -861,7 +861,13 @@ sub SetFromConfig {
# if option is already set we have to check where
# it comes from and may be ignore it
if ( exists $OPTIONS{$name} ) {
- if ( $args{'SiteConfig'} && $args{'Extension'} ) {
+ if ( $type eq 'HASH' ) {
+ $args{'Value'} = [
+ @{ $args{'Value'} },
+ @{ $args{'Value'} }%2? (undef) : (),
+ $self->Get( $name ),
+ ];
+ } elsif ( $args{'SiteConfig'} && $args{'Extension'} ) {
# if it's site config of an extension then it can only
# override options that came from its main config
if ( $args{'Extension'} ne $META{$name}->{'Source'}{'Extension'} ) {
-----------------------------------------------------------------------
More information about the Rt-commit
mailing list