From 6d113ca407d779460039e4abe99f1ff694219984 Mon Sep 17 00:00:00 2001 From: nathan Date: Tue, 22 Nov 2022 15:01:46 -0700 Subject: [PATCH] Resources: Hide customfields tab for categories have no customfields --- resources/inc/class.resources_ui.inc.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/resources/inc/class.resources_ui.inc.php b/resources/inc/class.resources_ui.inc.php index 8b98eaffea..5d4fafcdc4 100755 --- a/resources/inc/class.resources_ui.inc.php +++ b/resources/inc/class.resources_ui.inc.php @@ -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;