[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

SF.net SVN: ledger-smb: [1506] branches/1.2/LedgerSMB/PE.pm



Revision: 1506
          http://ledger-smb.svn.sourceforge.net/ledger-smb/?rev=1506&view=rev
Author:   tetragon
Date:     2007-09-05 11:17:13 -0700 (Wed, 05 Sep 2007)

Log Message:
-----------
Adjusting save_partsgroup to better fit my terminal window.

Modified Paths:
--------------
    branches/1.2/LedgerSMB/PE.pm

Modified: branches/1.2/LedgerSMB/PE.pm
===================================================================
--- branches/1.2/LedgerSMB/PE.pm	2007-09-05 18:12:39 UTC (rev 1505)
+++ branches/1.2/LedgerSMB/PE.pm	2007-09-05 18:17:13 UTC (rev 1506)
@@ -1024,19 +1024,21 @@
     my ( $self, $myconfig, $form ) = @_;
 
     my $dbh = $form->{dbh};
+    my @group = ($form->{partsgroup});
 
     if ( $form->{id} ) {
         $query = qq|
 			UPDATE partsgroup 
-			   SET partsgroup = | . $dbh->quote( $form->{partsgroup} ) . qq|
-			 WHERE id = $form->{id}|;
+			   SET partsgroup = ?
+			 WHERE id = ?|;
+        push @group, $form->{id};
     }
     else {
         $query = qq|
 			INSERT INTO partsgroup (partsgroup)
-			     VALUES (| . $dbh->quote( $form->{partsgroup} ) . qq|)|;
+			     VALUES (?)|;
     }
-    $dbh->do($query) || $form->dberror($query);
+    $dbh->do($query, undef, @group) || $form->dberror($query);
 
     $dbh->commit;
 


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.