diff --git a/CHANGELOG.md b/CHANGELOG.md index c9a04c7..cfb5f87 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,6 +15,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/). - Fix default entity insertion for a user - Fixed `SQL` error when creating new injection model +- Fixed issue with missing dropdown options ## [2.14.0] - 2024-10-10 diff --git a/inc/commoninjectionlib.class.php b/inc/commoninjectionlib.class.php index 86513b8..7fa83fa 100644 --- a/inc/commoninjectionlib.class.php +++ b/inc/commoninjectionlib.class.php @@ -2175,6 +2175,13 @@ public static function addToSearchOptions( $type_searchOptions[$id]['injectable'] = self::FIELD_INJECTABLE; } + //Some injection.class files are missing dropdown options. Set displaytype as dropdown if datatype is dropdown + //$tmp['displaytype'] is still empty. Set to prevent overwriting on next IF + if ((isset($tmp['datatype']) && $tmp['datatype'] == 'dropdown') && !isset($tmp['displaytype'])) { + $type_searchOptions[$id]['displaytype'] = 'dropdown'; + $tmp['displaytype'] = 'dropdown'; + } + if (isset($tmp['linkfield']) && !isset($tmp['displaytype'])) { $type_searchOptions[$id]['displaytype'] = 'text'; }