Changeset 2952

Show
Ignore:
Timestamp:
08/20/08 08:27:53 (3 months ago)
Author:
fumiakiy
Message:

But DO overwrite the default value for a setting if locale-specific value is defined.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/lib/MT.pm

    r2951 r2952  
    11361136    foreach my $setting (keys %lang_settings) { 
    11371137        my $const = $lang_settings{$setting}; 
    1138         $cfg->$setting(MT::I18N::const($const)) 
    1139             unless $cfg->$setting; 
     1138        my $value = $cfg->$setting; 
     1139        my $i18n_val = MT::I18N::const($const); 
     1140        if ( !$value ) { 
     1141            $cfg->$setting($i18n_val); 
     1142        } 
     1143        elsif ( ( $value eq $cfg->default($setting) ) 
     1144             && ( $value ne $i18n_val ) ) { 
     1145            $cfg->$setting($i18n_val); 
     1146        } 
    11401147    } 
    11411148