Skip to content

Commit f8630ba

Browse files
committed
fix(form): requesttype column no longer used
Signed-off-by: Thierry Bugier <tbugier@teclib.com>
1 parent 8445363 commit f8630ba

File tree

4 files changed

+4
-8
lines changed

4 files changed

+4
-8
lines changed

inc/form.class.php

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1336,12 +1336,6 @@ public function prepareInputForAdd($input) {
13361336
}
13371337
}
13381338

1339-
if (!isset($input['requesttype'])) {
1340-
$requestType = new RequestType();
1341-
$requestType->getFromDBByCrit(['name' => ['LIKE', 'Formcreator']]);
1342-
$input['requesttype'] = $requestType->getID();
1343-
}
1344-
13451339
return $input;
13461340
}
13471341

install/mysql/plugin_formcreator_empty.sql

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@ CREATE TABLE IF NOT EXISTS `glpi_plugin_formcreator_forms` (
4343
`icon_color` varchar(255) NOT NULL DEFAULT '',
4444
`background_color` varchar(255) NOT NULL DEFAULT '',
4545
`access_rights` tinyint(1) NOT NULL DEFAULT '1',
46-
`requesttype` int(11) NOT NULL DEFAULT '0',
4746
`description` varchar(255) DEFAULT NULL,
4847
`content` longtext,
4948
`plugin_formcreator_categories_id` int(11) unsigned NOT NULL DEFAULT '0',

install/upgrade_to_2.11.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,10 @@ public function upgrade(Migration $migration) {
144144
);
145145
}
146146
$migration->addField($table, 'sort_order', 'integer', ['after' => 'replace_helpdesk']);
147+
148+
// Remove unused column
149+
$table = 'glpi_plugin_formcreator_forms';
150+
$migration->dropField($table, 'requesttype');
147151
}
148152

149153
/**

tests/suite-unit/PluginFormcreatorForm.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -454,7 +454,6 @@ public function testExport() {
454454
'icon_color',
455455
'background_color',
456456
'access_rights',
457-
'requesttype',
458457
'description',
459458
'content',
460459
'is_active',

0 commit comments

Comments
 (0)