Unnecessary parameter ($db) in check_for_recursive_bom
authorJoe Hunt <joe.hunt.consulting@gmail.com>
Thu, 23 Aug 2007 23:01:25 +0000 (23:01 +0000)
committerJoe Hunt <joe.hunt.consulting@gmail.com>
Thu, 23 Aug 2007 23:01:25 +0000 (23:01 +0000)
CHANGELOG.txt
manufacturing/manage/bom_edit.php

index ed03cdffa2cdd9e2fc4c67c922ab2ff340b3d320..8e9e7b2d851caaf492ac8b1593f6ee379f4e4b58 100644 (file)
@@ -19,28 +19,32 @@ Legend:
 ! -> Note
 $ -> Affected files
 
-21-Aug-2007
+23-Aug-2007 Joe Hunt
+ # Unnecessary parameter ($db) in check_for_recursive_bom
+ $ /manufacturing/manage/bom_edit.php
+21-Aug-2007 Joe Hunt
  # Bug in /includes/lang/gettext.php (249) affecting changing language!
  $ /includes/lang/gettext.php
  
-08-Aug-2007
+08-Aug-2007 Joe Hunt
  # Minor adjustments
  $ config.php
    /access/login.php
    /admin/create_coy.php
    /reporting/includes/pdf_report.inc
    
-04-Aug-2007
+04-Aug-2007 Joe Hunt
  + Added a default fiscal year in the en_US-new.sql and start references.
  $ /sql/en_US-new.sql
  ! Changed some specific text strings in en_US.po (E.g. TAX instead of VAT)
  $ /lang/en_US/LC_MESSAGES/en_US.mo
  
-03-Aug-2007
+03-Aug-2007 Joe Hunt
  # A bug in Direct Invoicing (wrong Invoice Date) has been fixed.
  $ /sales/includes/db/sales_order_db.inc
  
-23-Jul-2007
+23-Jul-2007 Joe Hunt
  # Changed <? in front of 2 files to <?php.
  $ /purchasing/includes/purchasing_ui.inc
    /reporting/includes/class.mail.inc
index 559b79a29166ee2c2d3390c1264ece9753ca225e..2069f86b0e87386693dea066663082d137282173 100644 (file)
@@ -50,7 +50,7 @@ elseif (isset($_POST["selected_component"]))
 
 //--------------------------------------------------------------------------------------------------
 
-function check_for_recursive_bom($ultimate_parent, $component_to_check, $db
+function check_for_recursive_bom($ultimate_parent, $component_to_check) 
 {
 
        /* returns true ie 1 if the bom contains the parent part as a component
@@ -68,7 +68,7 @@ function check_for_recursive_bom($ultimate_parent, $component_to_check, $db)
                                return 1;
                        }
 
-                       if (check_for_recursive_bom($ultimate_parent, $myrow[0], &$db))
+                       if (check_for_recursive_bom($ultimate_parent, $myrow[0]))
                        {
                                return 1;
                        }
@@ -116,8 +116,6 @@ function display_bom_items($selected_parent)
 
 function on_submit($selected_parent, $selected_component)
 {
-       global $db;
-
        if (!is_numeric($_POST['quantity'])) 
        {
                display_error(_("The quantity entered must be numeric."));
@@ -150,7 +148,7 @@ function on_submit($selected_parent, $selected_component)
                /*Selected component is null cos no item selected on first time round so must be                                adding a record must be Submitting new entries in the new component form */
 
                //need to check not recursive bom component of itself!
-               If (!check_for_recursive_bom($selected_parent, $_POST['component'], &$db)) 
+               If (!check_for_recursive_bom($selected_parent, $_POST['component'])) 
                {
 
                        /*Now check to see that the component is not already on the bom */