aboutsummaryrefslogtreecommitdiffstats
path: root/perllib/FixMyStreet.pm
diff options
context:
space:
mode:
authorMatthew Somerville <matthew-github@dracos.co.uk>2017-10-04 18:05:33 +0100
committerMatthew Somerville <matthew-github@dracos.co.uk>2017-10-10 23:16:14 +0100
commit6f0ee01f37029c0fdabd161646b8dbbdec676165 (patch)
treeffd43cc0f02a6dd7cda3afc607a64e0de3a85a5c /perllib/FixMyStreet.pm
parent328e1933d1ada8b99bc69c15c7cdb01f3ce04a1d (diff)
Upgrade commonlib to read in config as Unicode.
This means variables do not need decoding in a few places.
Diffstat (limited to 'perllib/FixMyStreet.pm')
-rw-r--r--perllib/FixMyStreet.pm5
1 files changed, 2 insertions, 3 deletions
diff --git a/perllib/FixMyStreet.pm b/perllib/FixMyStreet.pm
index 7ee497584..b30f59472 100644
--- a/perllib/FixMyStreet.pm
+++ b/perllib/FixMyStreet.pm
@@ -12,7 +12,7 @@ use Sub::Override;
use mySociety::Config;
-my $CONF_FILE = $ENV{FMS_OVERRIDE_CONFIG} || 'general';
+my $CONF_FILE = $ENV{FMS_OVERRIDE_CONFIG} || 'general.yml';
# load the config file and store the contents in a readonly hash
mySociety::Config::set_file( __PACKAGE__->path_to("conf/${CONF_FILE}") );
@@ -108,8 +108,7 @@ sub override_config($&) {
my ($class, $key) = @_;
return { %CONFIG, %$config } unless $key;
return $config->{$key} if exists $config->{$key};
- my $orig_config = mySociety::Config::load_default();
- return $orig_config->{$key} if exists $orig_config->{$key};
+ return $CONFIG{$key} if exists $CONFIG{$key};
}
);