Api: Fix et2-select-cat with globalCategories="false" still included global categories

This commit is contained in:
nathan 2024-12-03 14:57:41 -07:00
parent 53a5428c82
commit 2537f0e70e

View File

@ -747,7 +747,7 @@ class Select extends Etemplate\Widget
case 'select-cat':
// !$type == globals cats too, $type2: extraStyleMultiselect, $type3: application, if not current-app, $type4: parent-id, $type5=owner (-1=global),$type6=show missing
$application = self::expand_name($widget->attrs['application'], 0, 0, '', '', self::$cont) ?? $type3;
$globalCategories = self::expand_name($widget->attrs['globalCategories'], 0, 0, '', '', self::$cont) ?? $type;
$globalCategories = self::expand_name($widget->attrs['globalCategories'], 0, 0, '', '', self::$cont) ?? $rows;
// set default of true (ajax_get_options uses a legacy_options string, which means nothing set is "")
if ($globalCategories === null || $globalCategories === '')
{