From 9ac69514fec5d49a989f7489beaed480a42d217d Mon Sep 17 00:00:00 2001 From: Moritz Bunkus Date: Mon, 27 Aug 2012 11:32:23 +0200 Subject: [PATCH] Konfigurationsdateien config/lx_office.conf{.default} in kivitendo.conf{.default} umbenennen --- .gitignore | 1 + SL/LxOfficeConf.pm | 7 +++++-- config/{lx_office.conf.default => kivitendo.conf.default} | 0 3 files changed, 6 insertions(+), 2 deletions(-) rename config/{lx_office.conf.default => kivitendo.conf.default} (100%) diff --git a/.gitignore b/.gitignore index 10b67869e..6c00133f2 100644 --- a/.gitignore +++ b/.gitignore @@ -5,6 +5,7 @@ crm /users/session_files/ /users/pid/ /config/lx_office.conf +/config/kivitendo.conf /doc/online/*/*.html pod2html* /doc/build/dobudish* diff --git a/SL/LxOfficeConf.pm b/SL/LxOfficeConf.pm index 89dbfde12..4e26c4e25 100644 --- a/SL/LxOfficeConf.pm +++ b/SL/LxOfficeConf.pm @@ -30,10 +30,13 @@ sub read { return unless $class->safe_require($may_fail); - read_config('config/lx_office.conf.default' => \%::lx_office_conf); + # Backwards compatibility: read lx_office.conf.default if + # kivitendo.conf.default does't exist. + my $default_config = -f "config/kivitendo.conf.default" ? 'kivitendo' : 'lx_office'; + read_config("config/${default_config}.conf.default" => \%::lx_office_conf); _decode_recursively(\%::lx_office_conf); - $file_name ||= 'config/lx_office.conf'; + $file_name ||= -f 'config/kivitendo.conf' ? 'config/kivitendo.conf' : 'config/lx_office.conf'; if (-f $file_name) { read_config($file_name => \ my %local_conf); diff --git a/config/lx_office.conf.default b/config/kivitendo.conf.default similarity index 100% rename from config/lx_office.conf.default rename to config/kivitendo.conf.default -- 2.20.1