From 428586fcfca4becd89880e47efe292f31f58ce5a Mon Sep 17 00:00:00 2001 From: einhverfr Date: Tue, 17 Oct 2006 15:49:36 +0000 Subject: Fixed bugs regarding run_custom_queries and new logins. git-svn-id: https://ledger-smb.svn.sourceforge.net/svnroot/ledger-smb/trunk@221 4979c152-3d1c-0410-bac9-87ea11338e46 --- LedgerSMB/AM.pm | 6 +++--- LedgerSMB/IC.pm | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 'LedgerSMB') diff --git a/LedgerSMB/AM.pm b/LedgerSMB/AM.pm index 82b58534..be9e47fe 100755 --- a/LedgerSMB/AM.pm +++ b/LedgerSMB/AM.pm @@ -77,7 +77,7 @@ sub get_account { LIMIT 1|; $sth = $dbh->prepare($query); $sth->execute($form->{id}); - ($form->{orphaned}) = $dbh->fetchrow_array(); + ($form->{orphaned}) = $sth->fetchrow_array(); $form->{orphaned} = !$form->{orphaned}; $dbh->commit; @@ -140,7 +140,7 @@ sub save_account { category = ?, link = ?, contra = ? - WHERE id = $form->{id}|; + WHERE id = ?|; push @queryargs, $form->{id}; } else { $query = qq| @@ -165,7 +165,7 @@ sub save_account { $sth = $dbh->prepare($query); $sth->execute($form->{accno}); - ($chart_id) = $sth->fetchrow_array($query); + ($chart_id) = $sth->fetchrow_array(); $sth->finish; } diff --git a/LedgerSMB/IC.pm b/LedgerSMB/IC.pm index 0da7dd60..c5ff74f6 100755 --- a/LedgerSMB/IC.pm +++ b/LedgerSMB/IC.pm @@ -199,7 +199,7 @@ sub get_part { $sth->finish; } - $form->get_custom_queries('parts', 'SELECT'); + $form->run_custom_queries('parts', 'SELECT'); } @@ -493,7 +493,7 @@ sub save { my $rc = $dbh->commit; $dbh->disconnect; - $form->get_custom_queries('parts', 'UPDATE'); + $form->run_custom_queries('parts', 'UPDATE'); $rc; } -- cgit v1.2.3