extension config can filter attributes by type

This commit is contained in:
Uwe Steinmann 2022-05-20 12:04:24 +02:00
parent f718f565ff
commit 8f6402c51f

View File

@ -613,10 +613,9 @@ if(($kkk = $this->callHook('getFullSearchEngine')) && is_array($kkk))
}
break;
case "attributedefinitions":
if(empty($conf['objtype']))
$recs = $dms->getAllAttributeDefinitions();
else
$recs = $dms->getAllAttributeDefinitions(explode(',', $conf['objtype']));
$objtype = empty($conf['objtype']) ? 0 : $conf['objtype'];
$attrtype = empty($conf['attrtype']) ? 0 : $conf['attrtype'];
$recs = $dms->getAllAttributeDefinitions(explode(',', $objtype), explode(',', $attrtype));
if($recs) {
echo "<select class=\"chzn-select\"".($allowempty ? " data-allow-clear=\"true\"" : "")."\" name=\"extensions[".$extname."][".$confkey."][]\"".(!empty($conf['multiple']) ? " multiple" : "").(!empty($conf['size']) ? " size=\"".$conf['size']."\"" : "")." data-placeholder=\"".getMLText("select_attribute_value")."\">";
if($allowempty)