Resources: Hide customfields tab for categories have no customfields

This commit is contained in:
nathan 2022-11-22 15:01:46 -07:00
parent 543fa93c9b
commit 6d113ca407

View File

@ -576,8 +576,8 @@ class resources_ui
}
// Disable custom tab if there are no custom fields defined
$read_only['tabs']['custom'] = !(Api\Storage\Customfields::get('resources',true));
$read_only['tabs']['history'] = ($content['history']['id'] != 0?false:true);
$read_only['tabs']['custom'] = !(Api\Storage\Customfields::get('resources', true, $content['cat_id']));
$read_only['tabs']['history'] = ($content['history']['id'] != 0 ? false : true);
$preserv = $content;