]> wagnertech.de Git - mfinanz.git/blobdiff - scripts/console
Globale Variablen nach %::lx_office_conf verschoben
[mfinanz.git] / scripts / console
index e3129a0d496251b0b6ada7ae050e44c18521f8b0..2613c72379b1da63b800efbafdaafd2a4e3201e1 100755 (executable)
@@ -14,7 +14,7 @@ use Data::Dumper;
 use Devel::REPL 1.002001;
 use Term::ReadLine::Perl::Bind;     # use sane key binding for rxvt users
 
 use Devel::REPL 1.002001;
 use Term::ReadLine::Perl::Bind;     # use sane key binding for rxvt users
 
-read_config 'config/console.conf' => my %config;# if -f 'config/console.conf';
+read_config 'config/lx_office.conf' => my %config;
 
 my $login        = shift || $config{Console}{login}        || 'demo';
 my $history_file =          $config{Console}{history_file} || '/tmp/lxoffice_console_history.log'; # fallback if users is not writable
 
 my $login        = shift || $config{Console}{login}        || 'demo';
 my $history_file =          $config{Console}{history_file} || '/tmp/lxoffice_console_history.log'; # fallback if users is not writable
@@ -39,8 +39,11 @@ package Devel::REPL;
 
 use utf8;
 use CGI qw( -no_xhtml);
 
 use utf8;
 use CGI qw( -no_xhtml);
+use DateTime;
 use SL::Auth;
 use SL::Auth;
+use SL::Dispatcher;
 use SL::Form;
 use SL::Form;
+use SL::Helper::DateTime;
 use SL::Locale;
 use SL::LXDebug;
 use Data::Dumper;
 use SL::Locale;
 use SL::LXDebug;
 use Data::Dumper;
@@ -56,15 +59,12 @@ sub lxinit {
 
   package main;
 
 
   package main;
 
-  { no warnings 'once';
-    $::userspath  = "users";
-    $::templates  = "templates";
-    $::sendmail   = "| /usr/sbin/sendmail -t";
-  }
-
   eval { require "config/lx-erp.conf"; };
   eval { require "config/lx-erp-local.conf"; } if -f "config/lx-erp-local.conf";
 
   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();
   $::lxdebug = LXDebug->new;
   $::locale = Locale->new($::language);
   $::cgi    = CGI->new qw();
@@ -191,8 +191,8 @@ of the classes they were created with.
 
 Configuration of this script is located in:
 
 
 Configuration of this script is located in:
 
- config/console.conf
- config/console.conf.default
+ config/lx_office.conf
+ config/lx_office.conf.default
 
 See there for interesting options.
 
 
 See there for interesting options.