summaryrefslogtreecommitdiff
path: root/FS
diff options
context:
space:
mode:
authorIvan Kohler <ivan@freeside.biz>2015-02-24 19:00:51 -0800
committerIvan Kohler <ivan@freeside.biz>2015-02-24 19:00:51 -0800
commit59fe7dfd7fa6d31c30f3458af05510041ba529e0 (patch)
treef023082101c91c521be956c17b5dcef5d76cc0e1 /FS
parent688288d7c60a648519d3b0127cd9286401078204 (diff)
avoid warnings in all non-web UI code with new conf cache, github#38, RT#33683
Diffstat (limited to 'FS')
-rw-r--r--FS/FS/Conf.pm8
1 files changed, 6 insertions, 2 deletions
diff --git a/FS/FS/Conf.pm b/FS/FS/Conf.pm
index e20474743..838b9cbf7 100644
--- a/FS/FS/Conf.pm
+++ b/FS/FS/Conf.pm
@@ -23,6 +23,8 @@ $base_dir = '%%%FREESIDE_CONF%%%';
$DEBUG = 0;
+$conf_cache_enabled = 0;
+
=head1 NAME
FS::Conf - Freeside configuration values
@@ -123,7 +125,8 @@ sub _config {
my($self,$name,$agentnum,$agentonly)=@_;
my $hashref = { 'name' => $name };
local $FS::Record::conf = undef; # XXX evil hack prevents recursion
- $conf_cache = undef unless $conf_cache_enabled; # use cache only when it is safe to do so
+ $conf_cache = undef unless $conf_cache_enabled; # use cache only when it is
+ # safe to do so
my $cv;
my @a = (
($agentnum || ()),
@@ -140,7 +143,8 @@ sub _config {
my $key = join(':',$name, $a, $l);
if (! exists $conf_cache->{$key}){
$hashref->{locale} = $l;
- # $conf_cache is reset in FS::UID during myconnect, so the cache is reset per connection
+ # $conf_cache is reset in FS::UID during myconnect, so the cache is
+ # reset per connection
$conf_cache->{$key} = FS::Record::qsearchs('conf', $hashref);
}
return $conf_cache->{$key} if $conf_cache->{$key};