From: Jan Büren Date: Sat, 20 Aug 2016 10:20:11 +0000 (+0200) Subject: new_lastmtime um optionalen dbh erweitert X-Git-Tag: release-3.5.4~2123 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=573d7fd17b43a09a21e1acb2423b0160523819a8;p=kivitendo-erp.git new_lastmtime um optionalen dbh erweitert --- diff --git a/SL/Form.pm b/SL/Form.pm index b5af00359..fb5dffe9b 100644 --- a/SL/Form.pm +++ b/SL/Form.pm @@ -2591,16 +2591,21 @@ sub all_vc { } sub new_lastmtime { - my ($self, $table, $option) = @_; + $main::lxdebug->enter_sub(); + + my ($self, $table, $provided_dbh) = @_; + my $dbh = $provided_dbh ? $provided_dbh : $self->get_standard_dbh; return unless $self->{id}; croak ("wrong call, no valid table defined") unless $table =~ /^(oe|ar|ap|delivery_orders|parts)$/; my $query = "SELECT mtime, itime FROM " . $table . " WHERE id = ?"; - my $ref = selectfirst_hashref_query($self, $self->get_standard_dbh, $query, $self->{id}); + my $ref = selectfirst_hashref_query($self, $dbh, $query, $self->{id}); $ref->{mtime} ||= $ref->{itime}; $self->{lastmtime} = $ref->{mtime}; $main::lxdebug->message(LXDebug->DEBUG2(),"new lastmtime=".$self->{lastmtime}); + + $main::lxdebug->leave_sub(); } sub mtime_ischanged {