X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=rt%2Flib%2FRT%2FConfig.pm;h=8d307398c545e9818d85a7a69b306cbdbe82a5ed;hb=73a6a80a9ca5edbd43d139b7cb25bfee4abfd35e;hp=fee6c51064ea56239d32bdeff600d42e9285405a;hpb=45d35d5739d05e602bc317739485693e0e9ff0b5;p=freeside.git diff --git a/rt/lib/RT/Config.pm b/rt/lib/RT/Config.pm index fee6c5106..8d307398c 100644 --- a/rt/lib/RT/Config.pm +++ b/rt/lib/RT/Config.pm @@ -2,7 +2,7 @@ # # COPYRIGHT: # -# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC +# This software is Copyright (c) 1996-2015 Best Practical Solutions, LLC # # # (Except where explicitly superseded by other copyright notices) @@ -460,7 +460,7 @@ our %META = ( 'The RTAddressRegexp option is not set in the config.' .' Not setting this option results in additional SQL queries to' .' check whether each address belongs to RT or not.' - .' It is especially important to set this option if RT recieves' + .' It is especially important to set this option if RT receives' .' emails on addresses that are not in the database or config.' ); } elsif (ref $value and ref $value eq "Regexp") { @@ -1024,7 +1024,6 @@ sub Get { my $res; if ( $user && $user->id && $META{$name}->{'Overridable'} ) { - $user = $user->UserObj if $user->isa('RT::CurrentUser'); my $prefs = $user->Preferences($RT::System); $res = $prefs->{$name} if $prefs; } @@ -1219,11 +1218,14 @@ sub SetFromConfig { my $entry = ${$pack}{$k}; next unless $entry; - # get entry for type we are looking for - # XXX skip references to scalars or other references. - # Otherwie 5.10 goes boom. maybe we should skip any - # reference - next if ref($entry) eq 'SCALAR' || ref($entry) eq 'REF'; + # Inlined constants are simplified in the symbol table -- + # namely, when possible, you only get a reference back in + # $entry, rather than a full GLOB. In 5.10, scalar + # constants began being inlined this way; starting in 5.20, + # list constants are also inlined. Notably, ref(GLOB) is + # undef, but inlined constants are currently either REF, + # SCALAR, or ARRAY. + next if ref($entry); my $ref_type = ref($ref);