Skip to content

Commit

Permalink
fix(form): requesttype column no longer used
Browse files Browse the repository at this point in the history
Signed-off-by: Thierry Bugier <tbugier@teclib.com>
btry committed Aug 6, 2020

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
1 parent 8445363 commit f8630ba
Showing 4 changed files with 4 additions and 8 deletions.
6 changes: 0 additions & 6 deletions inc/form.class.php
Original file line number Diff line number Diff line change
@@ -1336,12 +1336,6 @@ public function prepareInputForAdd($input) {
}
}

if (!isset($input['requesttype'])) {
$requestType = new RequestType();
$requestType->getFromDBByCrit(['name' => ['LIKE', 'Formcreator']]);
$input['requesttype'] = $requestType->getID();
}

return $input;
}

1 change: 0 additions & 1 deletion install/mysql/plugin_formcreator_empty.sql
Original file line number Diff line number Diff line change
@@ -43,7 +43,6 @@ CREATE TABLE IF NOT EXISTS `glpi_plugin_formcreator_forms` (
`icon_color` varchar(255) NOT NULL DEFAULT '',
`background_color` varchar(255) NOT NULL DEFAULT '',
`access_rights` tinyint(1) NOT NULL DEFAULT '1',
`requesttype` int(11) NOT NULL DEFAULT '0',
`description` varchar(255) DEFAULT NULL,
`content` longtext,
`plugin_formcreator_categories_id` int(11) unsigned NOT NULL DEFAULT '0',
4 changes: 4 additions & 0 deletions install/upgrade_to_2.11.php
Original file line number Diff line number Diff line change
@@ -144,6 +144,10 @@ public function upgrade(Migration $migration) {
);
}
$migration->addField($table, 'sort_order', 'integer', ['after' => 'replace_helpdesk']);

// Remove unused column
$table = 'glpi_plugin_formcreator_forms';
$migration->dropField($table, 'requesttype');
}

/**
1 change: 0 additions & 1 deletion tests/suite-unit/PluginFormcreatorForm.php
Original file line number Diff line number Diff line change
@@ -454,7 +454,6 @@ public function testExport() {
'icon_color',
'background_color',
'access_rights',
'requesttype',
'description',
'content',
'is_active',

0 comments on commit f8630ba

Please sign in to comment.