]> wagnertech.de Git - mfinanz.git/blobdiff - SL/Dispatcher.pm
Globale Variablen $::userspath, $::templates, $::membersfile nach %::lx_office_conf...
[mfinanz.git] / SL / Dispatcher.pm
index 687c373066113f373a11a4dca6acf03d3fc7d61f..57e2b545bc5262d78838ec9ac95d8d0bd0bb651d 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";
@@ -84,9 +87,6 @@ sub pre_startup_setup {
   # canonial globals. if it's not here, chances are it will get refactored someday.
   {
     no warnings 'once';
-    $::userspath   = "users";
-    $::templates   = "templates";
-    $::memberfile  = "users/members";
     $::menufile    = "menu.ini";
     $::sendmail    = "| /usr/sbin/sendmail -t";
     $::lxdebug     = LXDebug->new;
@@ -94,9 +94,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 {
@@ -193,7 +190,7 @@ sub handle_request {
     my $session_result = $::auth->restore_session;
     $::auth->create_or_refresh_session;
 
-    $::form->error($::locale->text('System currently down for maintenance!')) if -e "$::userspath/nologin" && $script ne 'admin';
+    $::form->error($::locale->text('System currently down for maintenance!')) if -e ($::lx_office_conf{paths}->{userspath} . "/nologin") && $script ne 'admin';
 
     if ($script eq 'login' or $script eq 'admin' or $script eq 'kopf') {
       $::form->{titlebar} = "Lx-Office " . $::locale->text('Version') . " $::form->{version}";