Skip to content

Commit 44f231b

Browse files
committed
fix(form_profile): UUID was not generated
Signed-off-by: btry <tbugier@teclib.com>
1 parent e8212ab commit 44f231b

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

inc/form_profile.class.php

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,23 @@ function getTabNameForItem(CommonGLPI $item, $withtemplate=0) {
5050
return self::getTypeName(2);
5151
}
5252

53+
/**
54+
* Prepare input data for adding the form
55+
*
56+
* @param array $input data used to add the item
57+
*
58+
* @return array the modified $input array
59+
*/
60+
public function prepareInputForAdd($input) {
61+
// generate a unique id
62+
if (!isset($input['uuid'])
63+
|| empty($input['uuid'])) {
64+
$input['uuid'] = plugin_formcreator_getUuid();
65+
}
66+
67+
return $input;
68+
}
69+
5370
static function displayTabContentForItem(CommonGLPI $item, $tabnum=1, $withtemplate=0) {
5471
global $DB, $CFG_GLPI;
5572

0 commit comments

Comments
 (0)