Fixed small bug when calling ui_lists.inc from WO issue.
authorJoe Hunt <joe.hunt.consulting@gmail.com>
Sat, 12 Dec 2015 10:16:34 +0000 (11:16 +0100)
committerJoe Hunt <joe.hunt.consulting@gmail.com>
Sat, 12 Dec 2015 10:16:34 +0000 (11:16 +0100)
includes/ui/ui_lists.inc

index 0d3b1ecf84e8f4e7089b2132e8b73b7f242012cf..fccfaafff2def44dd5fd16676571ab22c18443a3 100644 (file)
@@ -987,6 +987,7 @@ function stock_component_items_list_cells($label, $name, $parent_stock_id,
 {
        if ($label != null)
                echo "<td>$label</td>\n";
+       $parent = db_escape($parent_stock_id);
        echo stock_items_list($name, $selected_id, $all_option, $submit_on_change,
                array('where'=>array("stock_id != $parent"), 'cells'=>true, 'parent'=> $parent_stock_id), $editkey, "component");
 }