File tree 1 file changed +7
-7
lines changed
1 file changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -1670,16 +1670,16 @@ public function export(bool $remove_uuid = false): array {
1670
1670
$ export = $ this ->fields ;
1671
1671
1672
1672
// replace entity id
1673
- $ export [ ' _entity ' ]
1674
- = Dropdown:: getDropdownName ( Entity::getTable (),
1675
- $ export [ ' entities_id ' ]) ;
1673
+ /** @var Entity */
1674
+ $ entity = Entity::getById ( $ export [ ' entities_id ' ]);
1675
+ $ export [ ' _entity ' ] = $ entity -> fields [ ' completename ' ] ;
1676
1676
1677
1677
// replace form category id
1678
1678
$ export ['_plugin_formcreator_category ' ] = '' ;
1679
- if ( $ export [ ' plugin_formcreator_categories_id ' ] > 0 ) {
1680
- $ export ['_plugin_formcreator_category ' ]
1681
- = Dropdown:: getDropdownName (PluginFormcreatorCategory:: getTable (),
1682
- $ export [ ' plugin_formcreator_categories_id ' ]) ;
1679
+ /** @var PluginFormcreatorCategory */
1680
+ $ formCategory = PluginFormcreatorCategory:: getById ( $ export ['plugin_formcreator_categories_id ' ]);
1681
+ if ( $ formCategory instanceof CommonDBTM) {
1682
+ $ export [ ' _plugin_formcreator_category ' ] = $ formCategory -> fiels [ ' completename ' ] ;
1683
1683
}
1684
1684
1685
1685
// remove non needed keys
You can’t perform that action at this time.
0 commit comments