fixing currency.pl
authorPaul Poulain <paul.poulain@biblibre.com>
Wed, 28 Oct 2009 16:51:56 +0000 (17:51 +0100)
committerPaul Poulain <paul.poulain@biblibre.com>
Wed, 28 Oct 2009 16:51:56 +0000 (17:51 +0100)
if active not set, mySQL complains for a missing argument

admin/currency.pl

index ecd7b91..644b327 100755 (executable)
@@ -115,9 +115,10 @@ if ($op eq 'add_form') {
             WHERE currency = ?  |  );
 
         $sth->execute(  $input->param('rate'),
-                        $input->param('symbol'),
-                        $input->param('active'),
-                        $input->param('currency'),  );
+                        $input->param('symbol')||'',
+                        $input->param('active')||0,
+                        $input->param('currency'),
+                        );
     }
     else
     {
@@ -126,8 +127,9 @@ if ($op eq 'add_form') {
 
         $sth->execute(  $input->param('currency'),
                         $input->param('rate'),
-                        $input->param('symbol'),
-                        $input->param('active'),       );
+                        $input->param('symbol')||'',
+                        $input->param('active')||0,
+                        );
     }
                                                     # END $OP eq ADD_VALIDATE
 ################## DELETE_CONFIRM ##################################