summaryrefslogtreecommitdiff
path: root/LedgerSMB
diff options
context:
space:
mode:
authoreinhverfr <einhverfr@4979c152-3d1c-0410-bac9-87ea11338e46>2006-10-16 15:27:25 +0000
committereinhverfr <einhverfr@4979c152-3d1c-0410-bac9-87ea11338e46>2006-10-16 15:27:25 +0000
commit69ec77f6d98520ca738723c3bf1634291f32498b (patch)
tree1aef195dcacd84b213a216562e98245fb8d5e86e /LedgerSMB
parentc03b0c7d0ec23d0fa7690a8de6c9eebc650d0d71 (diff)
`cat svn-commit.2.tmp`
git-svn-id: https://ledger-smb.svn.sourceforge.net/svnroot/ledger-smb/trunk@219 4979c152-3d1c-0410-bac9-87ea11338e46
Diffstat (limited to 'LedgerSMB')
-rwxr-xr-xLedgerSMB/Form.pm5
1 files changed, 5 insertions, 0 deletions
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);