From: Moritz Bunkus Date: Wed, 19 Jan 2011 11:40:09 +0000 (+0100) Subject: Globales Konfigurationsobjekt %::lx_office_conf möglichst früh anlegen X-Git-Tag: release-2.6.3~61^2~7^2~1^2~9^2~13 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=ed7bfc4a981d759e51e19a5fe639983554fc8fc9;p=kivitendo-erp.git Globales Konfigurationsobjekt %::lx_office_conf möglichst früh anlegen --- diff --git a/SL/Dispatcher.pm b/SL/Dispatcher.pm index 687c37306..e92af8b02 100644 --- a/SL/Dispatcher.pm +++ b/SL/Dispatcher.pm @@ -75,6 +75,9 @@ sub pre_startup_setup { require "config/lx-erp-local.conf"; } if -f "config/lx-erp-local.conf"; + read_config 'config/lx_office.conf' => %::lx_office_conf; + _decode_recursively(\%::lx_office_conf); + eval { package main; require "bin/mozilla/common.pl"; @@ -94,9 +97,6 @@ sub pre_startup_setup { $::form = undef; %::myconfig = (); %::called_subs = (); # currently used for recursion detection - - read_config 'config/lx_office.conf' => %::lx_office_conf if -f "config/lx_office.conf"; - _decode_recursively(\%::lx_office_conf); } $SIG{__WARN__} = sub { diff --git a/scripts/console b/scripts/console index added9f83..4d89fdb57 100755 --- a/scripts/console +++ b/scripts/console @@ -68,15 +68,15 @@ sub lxinit { eval { require "config/lx-erp.conf"; }; eval { require "config/lx-erp-local.conf"; } if -f "config/lx-erp-local.conf"; + read_config 'config/lx_office.conf' => %::lx_office_conf; + SL::Dispatcher::_decode_recursively(\%::lx_office_conf); + $::lxdebug = LXDebug->new; $::locale = Locale->new($::language); $::cgi = CGI->new qw(); $::form = Form->new; $::auth = SL::Auth->new; - read_config 'config/lx_office.conf' => %::lx_office_conf; - SL::Dispatcher::_decode_recursively(\%::lx_office_conf); - die 'cannot reach auth db' unless $::auth->session_tables_present; $::auth->restore_session;