From: Moritz Bunkus Date: Fri, 11 May 2007 11:42:54 +0000 (+0000) Subject: Filehandles als lokal deklarieren; Kosmetik; Argumente für open() nicht aus $form... X-Git-Tag: release-2.4.3^2~346 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=ba863fd67776403dcf9de6b1141509a48a4b7204;p=kivitendo-erp.git Filehandles als lokal deklarieren; Kosmetik; Argumente für open() nicht aus $form erzeugen. Das Feature, dass für jede Person eine eigene menu.ini eingelesen wird, wird hoffentlich nie jemand eingesetzt haben. --- diff --git a/SL/Inifile.pm b/SL/Inifile.pm index 8ec3e80bd..eae4f49e4 100644 --- a/SL/Inifile.pm +++ b/SL/Inifile.pm @@ -43,6 +43,8 @@ sub new { my $id = ""; my $skip; + local *FH; + $type = ref($self) || $self; open FH, "$file" or Form->error("$file : $!"); diff --git a/bin/mozilla/menu.pl b/bin/mozilla/menu.pl index 3da92a906..fe2c731da 100644 --- a/bin/mozilla/menu.pl +++ b/bin/mozilla/menu.pl @@ -72,9 +72,6 @@ sub acc_menu { $mainlevel = $form->{level}; $mainlevel =~ s/$mainlevel--//g; my $menu = new Menu "$menufile"; - $menu = new Menu "custom_$menufile" if (-f "custom_$menufile"); - $menu = new Menu "$form->{login}_$menufile" - if (-f "$form->{login}_$menufile"); $form->{title} = $locale->text('Accounting Menu'); diff --git a/bin/mozilla/menunew.pl b/bin/mozilla/menunew.pl index b0b46e8c3..be6522181 100644 --- a/bin/mozilla/menunew.pl +++ b/bin/mozilla/menunew.pl @@ -126,9 +126,6 @@ sub acc_menu { $mainlevel = $form->{level}; $mainlevel =~ s/$mainlevel--//g; my $menu = new Menu "$menufile"; - $menu = new Menu "custom_$menufile" if (-f "custom_$menufile"); - $menu = new Menu "$form->{login}_$menufile" - if (-f "$form->{login}_$menufile"); $| = 1; diff --git a/bin/mozilla/menuv3.pl b/bin/mozilla/menuv3.pl index c9a3d541d..4ad56bd5e 100644 --- a/bin/mozilla/menuv3.pl +++ b/bin/mozilla/menuv3.pl @@ -133,9 +133,6 @@ sub acc_menu { $mainlevel = $form->{level}; $mainlevel =~ s/$mainlevel--//g; my $menu = new Menu "$menufile"; - $menu = new Menu "custom_$menufile" if (-f "custom_$menufile"); - $menu = new Menu "$form->{login}_$menufile" - if (-f "$form->{login}_$menufile"); $| = 1;