From: Moritz Bunkus Date: Fri, 5 Feb 2010 14:04:31 +0000 (+0100) Subject: Globale Variable bei jedem Request initialisieren. X-Git-Tag: release-2.6.2beta1~290 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=fd574abba34aa0c58882ec32ebadb13551d9e77b;p=kivitendo-erp.git Globale Variable bei jedem Request initialisieren. --- diff --git a/SL/Dispatcher.pm b/SL/Dispatcher.pm index 7e195b486..fb88af58e 100644 --- a/SL/Dispatcher.pm +++ b/SL/Dispatcher.pm @@ -67,14 +67,15 @@ sub pre_startup_setup { # dummy globals { no warnings 'once'; - $::userspath = "users"; - $::templates = "templates"; - $::memberfile = "users/members"; - $::menufile = "menu.ini"; - $::sendmail = "| /usr/sbin/sendmail -t"; - $::lxdebug = LXDebug->new; - $::auth = SL::Auth->new; - %::myconfig = (); + $::userspath = "users"; + $::templates = "templates"; + $::memberfile = "users/members"; + $::menufile = "menu.ini"; + $::sendmail = "| /usr/sbin/sendmail -t"; + $::lxdebug = LXDebug->new; + $::auth = SL::Auth->new; + %::myconfig = (); + %::called_subs = (); } } diff --git a/bin/mozilla/common.pl b/bin/mozilla/common.pl index 85fb3fbf9..b86ce78a1 100644 --- a/bin/mozilla/common.pl +++ b/bin/mozilla/common.pl @@ -509,8 +509,6 @@ sub show_history { # ------------------------------------------------------------------------- -my %_called_subs = (); - sub call_sub { $main::lxdebug->enter_sub(); @@ -529,8 +527,8 @@ sub call_sub { $form->error(sprintf($locale->text("Attempt to call an undefined sub named '%s'"), $name)); } - $_called_subs{$name}++; -# confess "RECURSION DETECTION: call_sub($name) called " . $_called_subs{$name} . " time(s)" if $_called_subs{$name} > 10; + $::called_subs{$name}++; + confess "RECURSION DETECTION: call_sub($name) called " . $::called_subs{$name} . " time(s)" if $::called_subs{$name} > 10; { no strict "refs";