From 60ba8557a1b9866e5ac38dc55cd48f72f0b71e5e Mon Sep 17 00:00:00 2001 From: Xavier Guimard Date: Wed, 27 Oct 2010 08:04:28 +0000 Subject: [PATCH] Closes #216 "getLocalConf called without 2nd argument" --- .../lemonldap-ng-common/lib/Lemonldap/NG/Common/Conf.pm | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/modules/lemonldap-ng-common/lib/Lemonldap/NG/Common/Conf.pm b/modules/lemonldap-ng-common/lib/Lemonldap/NG/Common/Conf.pm index 9b2b50c81..2adab6d04 100644 --- a/modules/lemonldap-ng-common/lib/Lemonldap/NG/Common/Conf.pm +++ b/modules/lemonldap-ng-common/lib/Lemonldap/NG/Common/Conf.pm @@ -22,7 +22,7 @@ use Config::IniFiles; our $VERSION = 0.70; our $msg; -our $configFiles; +our $iniObj; ## @cmethod Lemonldap::NG::Common::Conf new(hashRef arg) # Constructor. @@ -187,12 +187,12 @@ sub getLocalConf { my $r = {}; $section ||= DEFAULTSECTION; - $file ||= DEFAULTCONFFILE; + $file ||= $self->{confFile} || DEFAULTCONFFILE; $loaddefault = 1 unless ( defined $loaddefault ); my $cfg; # First, search if this file has been parsed - unless ( $cfg = $configFiles->{$file} ) { + unless ( $cfg = $iniObj->{$file} ) { # If default configuration cannot be read # - Error if configuration section is requested @@ -225,8 +225,8 @@ sub getLocalConf { $msg = "Configuration section (" . CONFSECTION . ") is missing."; return $r; } - $configFiles->{$file} = $cfg; } + $self->{_iniObj} = $cfg; # First load all default section parameters if ($loaddefault) {