File tree Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Expand file tree Collapse file tree 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 {
16701670 $ export = $ this ->fields ;
16711671
16721672 // 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 ' ] ;
16761676
16771677 // replace form category id
16781678 $ 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 ' ] ;
16831683 }
16841684
16851685 // remove non needed keys
You can’t perform that action at this time.
0 commit comments