X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/mfinanz.git/blobdiff_plain/4fd8bdbfb46b8b63a7d05457959b98c4956d1dbd..dad628a3c28d66caf59d23c3c7a8949e39bff81c:/SL/DBUpgrade2.pm diff --git a/SL/DBUpgrade2.pm b/SL/DBUpgrade2.pm index 514448f6d..b63b74903 100644 --- a/SL/DBUpgrade2.pm +++ b/SL/DBUpgrade2.pm @@ -103,14 +103,20 @@ sub _check_for_loops { push(@path, $tag); - _control_error($form, $file_name, - $main::locale->text("Dependency loop detected:") . - " " . join(" -> ", @path)) - if ($controls->{$tag}->{"loop"}); - - $controls->{$tag}->{"loop"} = 1; - map({ _check_for_loops($form, $file_name, $controls, $_, @path); } - @{$controls->{$tag}->{"depends"}}); + my $ctrl = $controls->{$tag}; + + if ($ctrl->{"loop"} == 1) { + # Not done yet. + _control_error($form, $file_name, + $main::locale->text("Dependency loop detected:") . + " " . join(" -> ", @path)) + } elsif ($ctrl->{"loop"} == 0) { + # Not checked yet. + $ctrl->{"loop"} = 1; + map({ _check_for_loops($form, $file_name, $controls, $_, @path); } + @{ $ctrl->{"depends"} }); + $ctrl->{"loop"} = 2; + } } sub _control_error {