diff --git a/webform.install b/webform.install index a96a664..d9f9532 100644 --- a/webform.install +++ b/webform.install @@ -406,18 +406,20 @@ function webform_install() { db_query("UPDATE {system} SET weight = -1 WHERE name='webform' AND type='module'"); drupal_install_schema('webform'); - // Create the default webform type. - $webform_type = array( - 'type' => 'webform', - 'name' => st('Webform'), - 'module' => 'node', - 'description' => st('Create a new form or questionnaire accessible to users. Submission results and statistics are recorded and accessible to privileged users.'), - 'custom' => TRUE, - 'modified' => TRUE, - 'locked' => FALSE, - ); - $webform_type = (object) _node_type_set_defaults($webform_type); - node_type_save($webform_type); + // Optionally create the default webform type. + if (variable_get('webform_create_content_type', TRUE)) { + $webform_type = array( + 'type' => 'webform', + 'name' => st('Webform'), + 'module' => 'node', + 'description' => st('Create a new form or questionnaire accessible to users. Submission results and statistics are recorded and accessible to privileged users.'), + 'custom' => TRUE, + 'modified' => TRUE, + 'locked' => FALSE, + ); + $webform_type = (object) _node_type_set_defaults($webform_type); + node_type_save($webform_type); + } } /**