diff options
author | einhverfr <einhverfr@4979c152-3d1c-0410-bac9-87ea11338e46> | 2006-10-16 15:27:25 +0000 |
---|---|---|
committer | einhverfr <einhverfr@4979c152-3d1c-0410-bac9-87ea11338e46> | 2006-10-16 15:27:25 +0000 |
commit | 69ec77f6d98520ca738723c3bf1634291f32498b (patch) | |
tree | 1aef195dcacd84b213a216562e98245fb8d5e86e | |
parent | c03b0c7d0ec23d0fa7690a8de6c9eebc650d0d71 (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
-rwxr-xr-x | LedgerSMB/Form.pm | 5 | ||||
-rwxr-xr-x | bin/admin.pl | 1 | ||||
-rwxr-xr-x | menu.pl | 1 |
3 files changed, 6 insertions, 1 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); diff --git a/bin/admin.pl b/bin/admin.pl index 9a90830a..88ecc367 100755 --- a/bin/admin.pl +++ b/bin/admin.pl @@ -754,6 +754,7 @@ sub form_header { sub save { + $form->db_init; # no driver checked $form->error($locale->text('Database Driver not checked!')) unless $form->{dbdriver}; @@ -106,7 +106,6 @@ $SIG{__DIE__} = sub { $form->error($_[0]) }; $myconfig{dbpasswd} = unpack 'u', $myconfig{dbpasswd}; map { $form->{$_} = $myconfig{$_} } qw(stylesheet timeout) unless ($form->{type} eq 'preferences'); - $form->db_init(\%myconfig); if ($form->{path} ne 'bin/lynx'){ $form->{path} = 'bin/mozilla';} |