From 0fbf3d13c3f3f4220edb641f1d92cb8204490b6d Mon Sep 17 00:00:00 2001 From: Curtis Conard Date: Tue, 1 Mar 2022 07:20:16 -0500 Subject: [PATCH] Drop not injectable fields before single linkfield workaround fixes #259 fixes #243 fixes #233 --- inc/commoninjectionlib.class.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/inc/commoninjectionlib.class.php b/inc/commoninjectionlib.class.php index 103763d0..e4eaf477 100644 --- a/inc/commoninjectionlib.class.php +++ b/inc/commoninjectionlib.class.php @@ -2004,6 +2004,13 @@ static function addToSearchOptions(array $type_searchOptions, array $options, } } + // Drop not injectable fields + foreach ($type_searchOptions as $id => $tmp) { + if (!isset($tmp['injectable']) || $tmp['injectable'] <= 0) { + unset($type_searchOptions[$id]); + } + } + foreach (['displaytype', 'checktype'] as $paramtype) { if (isset($options[$paramtype])) { foreach ($options[$paramtype] as $type => $tabsID) {