Refactor value handling in multiple classes to simplify JSON decoding process

This commit is contained in:
2024-11-01 00:12:24 +01:00
parent d181cd19b1
commit 83400eda0f
22 changed files with 251 additions and 473 deletions

View File

@@ -1108,11 +1108,12 @@ class ShopProduct
{
$order = self::max_order() + 1;
$mdb -> insert('pp_shop_products_categories', [
'product_id' => (int) $product_id,
'category_id' => (int) $category,
'o' => (int) $order,
]);
if ( $product_id and $category )
$mdb -> insert( 'pp_shop_products_categories', [
'product_id' => (int)$product_id,
'category_id' => (int)$category,
'o' => (int) $order,
] );
}
}