From 69ec77f6d98520ca738723c3bf1634291f32498b Mon Sep 17 00:00:00 2001 From: einhverfr Date: Mon, 16 Oct 2006 15:27:25 +0000 Subject: `cat svn-commit.2.tmp` git-svn-id: https://ledger-smb.svn.sourceforge.net/svnroot/ledger-smb/trunk@219 4979c152-3d1c-0410-bac9-87ea11338e46 --- LedgerSMB/Form.pm | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'LedgerSMB') diff --git a/LedgerSMB/Form.pm b/LedgerSMB/Form.pm index 5f7adb01..4b6fbad2 100755 --- a/LedgerSMB/Form.pm +++ b/LedgerSMB/Form.pm @@ -2704,8 +2704,13 @@ sub update_defaults { my ($self, $myconfig, $fld) = @_; + if (!$self->{dbh}){ + $self->db_init($myconfig); + } + my $dbh = $self->{dbh}; + my $query = qq|SELECT $fld FROM defaults FOR UPDATE|; ($_) = $dbh->selectrow_array($query); -- cgit v1.2.3