From c3273f0186fae5e255ca9ad47dbcaae95c838ef8 Mon Sep 17 00:00:00 2001 From: Coleman Watts Date: Fri, 31 Jan 2020 11:39:40 -0500 Subject: [PATCH] Code comment --- ext/afform/core/Civi/Api4/Action/Afform/Get.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ext/afform/core/Civi/Api4/Action/Afform/Get.php b/ext/afform/core/Civi/Api4/Action/Afform/Get.php index e3bfe1e6bf..5923017e2a 100644 --- a/ext/afform/core/Civi/Api4/Action/Afform/Get.php +++ b/ext/afform/core/Civi/Api4/Action/Afform/Get.php @@ -79,8 +79,8 @@ class Get extends \Civi\Api4\Generic\BasicGetAction { $groupNames[] = substr($name, 13); } } - if ( - (!empty($toGet['name']) && !$groupNames) + // Early return if this api call is fetching afforms by name and those names are not custom-related + if ((!empty($toGet['name']) && !$groupNames) || (!empty($toGet['module_name']) && !strstr(implode(' ', $toGet['module_name']), 'afjoinCustom')) || (!empty($toGet['directive_name']) && !strstr(implode(' ', $toGet['directive_name']), 'afjoin-custom')) ) { -- 2.25.1