From 1bb4746aab9fd0062463cf1c6374fea3e3b15eae Mon Sep 17 00:00:00 2001 From: =?utf8?q?Sven=20Sch=C3=B6ling?= Date: Tue, 20 Jul 2010 10:49:02 +0200 Subject: [PATCH] =?utf8?q?=C3=9Cberfl=C3=BCssige=20globale=20Variablen=20e?= =?utf8?q?ntfernt.?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Bzw. die "my $menufile" aus den verschiedenen Menüscripten in eine einzige globale Variable verschoben. Conflicts: bin/mozilla/menu.pl --- SL/Dispatcher.pm | 1 + bin/mozilla/do.pl | 4 ---- bin/mozilla/menu.pl | 2 +- bin/mozilla/menuXML.pl | 3 +-- bin/mozilla/menujs.pl | 3 +-- bin/mozilla/menuv3.pl | 4 +--- bin/mozilla/menuv4.pl | 4 +--- bin/mozilla/oe.pl | 3 --- 8 files changed, 6 insertions(+), 18 deletions(-) diff --git a/SL/Dispatcher.pm b/SL/Dispatcher.pm index 3b64e48c3..7e195b486 100644 --- a/SL/Dispatcher.pm +++ b/SL/Dispatcher.pm @@ -70,6 +70,7 @@ sub pre_startup_setup { $::userspath = "users"; $::templates = "templates"; $::memberfile = "users/members"; + $::menufile = "menu.ini"; $::sendmail = "| /usr/sbin/sendmail -t"; $::lxdebug = LXDebug->new; $::auth = SL::Auth->new; diff --git a/bin/mozilla/do.pl b/bin/mozilla/do.pl index e350cb342..d5e8d3a0e 100644 --- a/bin/mozilla/do.pl +++ b/bin/mozilla/do.pl @@ -48,8 +48,6 @@ require "bin/mozilla/reportgenerator.pl"; use strict; -my $print_post; - 1; # end of main @@ -905,8 +903,6 @@ sub e_mail { $form->{print_and_save} = 1; - $print_post = 1; - my $saved_form = save_form(); save(); diff --git a/bin/mozilla/menu.pl b/bin/mozilla/menu.pl index 2495d07cb..4a46026fe 100644 --- a/bin/mozilla/menu.pl +++ b/bin/mozilla/menu.pl @@ -84,7 +84,7 @@ sub acc_menu { $mainlevel = $form->{level}; $mainlevel =~ s/\Q$mainlevel\E--//g; - my $menu = new Menu "$menufile"; + my $menu = Menu->new($::menufile); $form->{title} = $locale->text('Accounting Menu'); diff --git a/bin/mozilla/menuXML.pl b/bin/mozilla/menuXML.pl index b79d605fd..e2c8270eb 100644 --- a/bin/mozilla/menuXML.pl +++ b/bin/mozilla/menuXML.pl @@ -36,7 +36,6 @@ # 2007-10-14 - XMLified - Holger Will ####################################################################### -my $menufile = "menu.ini"; use SL::Menu; use CGI::Carp qw(fatalsToBrowser); @@ -98,7 +97,7 @@ sub acc_menu { my $mainlevel = $form->{level}; $mainlevel =~ s/$mainlevel--//g; - my $menu = new Menu "$menufile"; + my $menu = Menu->new($::menufile); $| = 1; diff --git a/bin/mozilla/menujs.pl b/bin/mozilla/menujs.pl index af60595c8..7cc592671 100644 --- a/bin/mozilla/menujs.pl +++ b/bin/mozilla/menujs.pl @@ -35,7 +35,6 @@ # 2004-12-14 - Holger Lindemann ####################################################################### -my $menufile = "menu.ini"; use SL::Menu; use CGI::Carp qw(fatalsToBrowser); @@ -136,7 +135,7 @@ sub acc_menu { my $mainlevel = $form->{level}; $mainlevel =~ s/$mainlevel--//g; - my $menu = new Menu "$menufile"; + my $menu = Menu->new($::menufile); $| = 1; diff --git a/bin/mozilla/menuv3.pl b/bin/mozilla/menuv3.pl index 49adcefa1..e35a51e07 100644 --- a/bin/mozilla/menuv3.pl +++ b/bin/mozilla/menuv3.pl @@ -37,8 +37,6 @@ use URI; use strict; -my $menufile = "menu.ini"; - 1; # end of main @@ -87,7 +85,7 @@ sub acc_menu { my $mainlevel = $form->{level}; $mainlevel =~ s/\Q$mainlevel\E--//g; - my $menu = new Menu "$menufile"; + my $menu = Menu->new($::menufile); $| = 1; diff --git a/bin/mozilla/menuv4.pl b/bin/mozilla/menuv4.pl index 5459f6e8a..56d734728 100644 --- a/bin/mozilla/menuv4.pl +++ b/bin/mozilla/menuv4.pl @@ -37,8 +37,6 @@ use URI; use strict; -my $menufile = "menu.ini"; - 1; # end of main @@ -89,7 +87,7 @@ sub acc_menu { my $mainlevel = $form->{level}; $mainlevel =~ s/\Q$mainlevel\E--//g; - my $menu = new Menu "$menufile"; + my $menu = Menu->new($::menufile); $| = 1; diff --git a/bin/mozilla/oe.pl b/bin/mozilla/oe.pl index cd04c6b27..a2085f6a0 100644 --- a/bin/mozilla/oe.pl +++ b/bin/mozilla/oe.pl @@ -50,7 +50,6 @@ require "bin/mozilla/reportgenerator.pl"; use strict; -my $print_post; our %TMPL_VAR; 1; @@ -1858,8 +1857,6 @@ sub e_mail { $form->{print_and_save} = 1; - $print_post = 1; - my $saved_form = save_form(); save(); -- 2.20.1