Globales Konfigurationsobjekt %::lx_office_conf möglichst früh anlegen
authorMoritz Bunkus <m.bunkus@linet-services.de>
Wed, 19 Jan 2011 11:40:09 +0000 (12:40 +0100)
committerMoritz Bunkus <m.bunkus@linet-services.de>
Wed, 19 Jan 2011 11:40:09 +0000 (12:40 +0100)
SL/Dispatcher.pm
scripts/console

index 687c373..e92af8b 100644 (file)
@@ -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 {
index added9f..4d89fdb 100755 (executable)
@@ -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;