Auf gar keine Fall nicht ueberkomplizierte Logik nicht leichter gemacht...
[kivitendo-erp.git] / am.pl
diff --git a/am.pl b/am.pl
index b8a8b2d..98d990c 100755 (executable)
--- a/am.pl
+++ b/am.pl
 #
 #######################################################################
 
+BEGIN {
+  push(@INC, "modules");
+}
+
 # setup defaults, DO NOT CHANGE
 $userspath  = "users";
 $templates  = "templates";
@@ -42,17 +46,21 @@ $| = 1;
 use SL::LXDebug;
 $lxdebug = LXDebug->new();
 
+use CGI;
 use SL::Form;
 use SL::Locale;
 
 eval { require "lx-erp.conf"; };
 
+require "bin/mozilla/common.pl";
+
 if (defined($latex) && !defined($latex_templates)) {
   $latex_templates = $latex;
   undef($latex);
 }
 
 $form = new Form;
+$cgi = new CGI('');
 
 # name of this script
 $0 =~ tr/\\/\//;
@@ -123,7 +131,7 @@ if ($form->{action}) {
     . $locale->text('Version')
     . " $form->{version} - $myconfig{name} - $myconfig{dbname}";
 
-  &{ $locale->findsub($form->{action}) };
+  call_sub($locale->findsub($form->{action}));
 } else {
   $form->error($locale->text('action= not defined!'));
 }