Skip to content

Commit

Permalink
Fix for Missing Dropdown Options (#448)
Browse files Browse the repository at this point in the history
* Fix for missing dropdown options

* Update changelog

* Update inc/commoninjectionlib.class.php

Co-authored-by: Stanislas <[email protected]>

---------

Co-authored-by: Stanislas <[email protected]>
  • Loading branch information
PlaneNuts and stonebuzz authored Dec 17, 2024
1 parent 94f6c1b commit cbcbe68
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
7 changes: 7 additions & 0 deletions inc/commoninjectionlib.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -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';
}
Expand Down

0 comments on commit cbcbe68

Please sign in to comment.