From: Moritz Bunkus Date: Mon, 21 May 2007 13:11:43 +0000 (+0000) Subject: Das Löschen von $form-Variablen im Watchdog ebenfalls abfangen und überwachen. X-Git-Tag: release-2.4.3^2~277 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=ff575015b4bf46c210403257cb7fb0c4f3fe8c28;p=kivitendo-erp.git Das Löschen von $form-Variablen im Watchdog ebenfalls abfangen und überwachen. --- diff --git a/SL/Watchdog.pm b/SL/Watchdog.pm index 69ec53ce0..9001b1b32 100644 --- a/SL/Watchdog.pm +++ b/SL/Watchdog.pm @@ -44,4 +44,27 @@ sub STORE { $this->{$key} = $value; } +sub DELETE { + my ($this, $key) = @_; + + if ($watched_variables{$key} && ($this->{$key} ne "")) { + my $subroutine = (caller 1)[3]; + my ($self_filename, $self_line) = (caller)[1, 2]; + $main::lxdebug->_write("WATCH", + "Value of '$key' changed from '$this->{$key}' to '' " + . "in ${subroutine} at ${self_filename}:${self_line}"); + if ($watched_variables{$key} > 1) { + my $level = 1; + my ($dummy, $filename, $line); + + while (($dummy, $filename, $line, $subroutine) = caller $level) { + $main::lxdebug->_write("WATCH", " ${subroutine} from ${filename}:${line}"); + $level++; + } + } + } + + delete $this->{$key}; +} + 1;