From: Moritz Bunkus Date: Thu, 13 Jan 2011 12:37:27 +0000 (+0100) Subject: Für jeden ausgeführten Job globale Variablen initialisieren X-Git-Tag: release-2.6.3~61^2~7^2~1^2~2^2~26 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=f6669610e0738fa19fd8345132ff43bf8bb8b06a;p=kivitendo-erp.git Für jeden ausgeführten Job globale Variablen initialisieren --- diff --git a/scripts/task_server.pl b/scripts/task_server.pl index 2460e1b56..bbe3353ae 100755 --- a/scripts/task_server.pl +++ b/scripts/task_server.pl @@ -118,7 +118,14 @@ sub gd_run { $::lxdebug->message(0, " Found: " . join(' ', map { $_->package_name } @{ $jobs })) if $config{task_server}->{debug} && @{ $jobs }; - $_->run for @{ $jobs }; + foreach my $job (@{ $jobs }) { + # Provide fresh global variables in case legacy code modifies + # them somehow. + $::locale = Locale->new($::language); + $::form = Form->new; + + $job->run; + } 1; };