Skip to content

Commit 0954f9c

Browse files
committed
Fixed problem when creating a new part from a category, this category was not applied for the Part creation dialog.
1 parent a1c3589 commit 0954f9c

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

edit_part_info.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,8 @@
7171
$new_instock = isset($_POST['instock']) ? (integer)$_POST['instock'] : 0;
7272
$new_instock = isset($_POST['instock_unknown']) ? (integer) Part::INSTOCK_UNKNOWN : $new_instock;
7373
$new_mininstock = isset($_POST['mininstock']) ? (integer)$_POST['mininstock'] : 0;
74-
$new_category_id = isset($_POST['category_id']) ? (integer)$_POST['category_id'] : 0;
74+
//The category ID is given as a GET param, so we need REQUEST here.
75+
$new_category_id = isset($_REQUEST['category_id']) ? (integer)$_REQUEST['category_id'] : 0;
7576
$new_storelocation_id = isset($_POST['storelocation_id']) ? (integer)$_POST['storelocation_id'] : 0;
7677
$new_footprint_id = isset($_POST['footprint_id']) ? (integer)$_POST['footprint_id'] : 0;
7778
$new_visible = isset($_POST['visible']);

0 commit comments

Comments
 (0)