Merge pull request #19871 from OPEN-DSI/new-const-search-cat-or-default

NEW MAIN_SEARCH_CAT_OR_BY_DEFAULT const for search by category
This commit is contained in:
Laurent Destailleur 2022-01-19 01:06:32 +01:00 committed by GitHub
commit ede465e78e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -65,7 +65,12 @@ $search_barcode = GETPOST("search_barcode", 'alpha');
$search_label = GETPOST("search_label", 'alpha');
$search_type = GETPOST("search_type", 'int');
$search_vatrate = GETPOST("search_vatrate", 'alpha');
$searchCategoryProductOperator = (GETPOST('search_category_product_operator', 'int') ? GETPOST('search_category_product_operator', 'int') : 0);
$searchCategoryProductOperator = 0;
if (GETPOSTISSET('formfilteraction')) {
$searchCategoryProductOperator = GETPOST('search_category_product_operator', 'int');
} elseif (!empty($conf->global->MAIN_SEARCH_CAT_OR_BY_DEFAULT)) {
$searchCategoryProductOperator = $conf->global->MAIN_SEARCH_CAT_OR_BY_DEFAULT;
}
$searchCategoryProductList = GETPOST('search_category_product_list', 'array');
$search_tosell = GETPOST("search_tosell", 'int');
$search_tobuy = GETPOST("search_tobuy", 'int');