From 28e11d2481f02953c2a61c6bb6a8efe3f44d955f Mon Sep 17 00:00:00 2001 From: Moritz Bunkus Date: Fri, 20 May 2011 10:42:02 +0200 Subject: [PATCH] =?utf8?q?Erm=C3=B6glichen,=20dass=20andere=20Konfiguratio?= =?utf8?q?nsdatei=20als=20config/lx=5Foffice.conf=20eingelesen=20wird?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Stichwort: verschiedene Mandanten in ein und derselben Installation. Bisher nur für Task-Server (kommt im nächsten Commit). --- SL/LxOfficeConf.pm | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/SL/LxOfficeConf.pm b/SL/LxOfficeConf.pm index 8f44016e6..7690eebda 100644 --- a/SL/LxOfficeConf.pm +++ b/SL/LxOfficeConf.pm @@ -6,11 +6,15 @@ use Config::Std; use Encode; sub read { + my ($class, $file_name) = @_; + read_config 'config/lx_office.conf.default' => %::lx_office_conf; _decode_recursively(\%::lx_office_conf); - if (-f 'config/lx_office.conf') { - read_config 'config/lx_office.conf' => my %local_conf; + $file_name ||= 'config/lx_office.conf'; + + if (-f $file_name) { + read_config $file_name => my %local_conf; _decode_recursively(\%local_conf); _flat_merge(\%::lx_office_conf, \%local_conf); } -- 2.20.1