From 91ccdda421835fe3091c9204d912a6dbd1a5d57a Mon Sep 17 00:00:00 2001 From: Angie Byron Date: Thu, 11 Feb 2010 03:29:22 +0000 Subject: #628244 by catch, bangpound, and yched: Remove magic taxonomy field creation in favour of consistency. --- modules/taxonomy/taxonomy.module | 26 -------------------------- 1 file changed, 26 deletions(-) (limited to 'modules/taxonomy/taxonomy.module') diff --git a/modules/taxonomy/taxonomy.module b/modules/taxonomy/taxonomy.module index 13578be04..dcfe129cb 100644 --- a/modules/taxonomy/taxonomy.module +++ b/modules/taxonomy/taxonomy.module @@ -371,7 +371,6 @@ function taxonomy_vocabulary_save($vocabulary) { elseif (empty($vocabulary->vid)) { $status = drupal_write_record('taxonomy_vocabulary', $vocabulary); field_attach_create_bundle('taxonomy_term', $vocabulary->machine_name); - taxonomy_vocabulary_create_field($vocabulary); module_invoke_all('taxonomy_vocabulary_insert', $vocabulary); entity_invoke('insert', 'taxonomy_vocabulary', $vocabulary); } @@ -451,31 +450,6 @@ function taxonomy_check_vocabulary_hierarchy($vocabulary, $changed_term) { return $hierarchy; } -/** - * Create a default field when a vocabulary is created. - * - * @param $vocabulary - * A taxonomy vocabulary object. - */ -function taxonomy_vocabulary_create_field($vocabulary) { - $field = array( - 'field_name' => 'taxonomy_' . $vocabulary->machine_name, - 'type' => 'taxonomy_term_reference', - // Set cardinality to unlimited so that select - // and autocomplete widgets behave as normal. - 'cardinality' => FIELD_CARDINALITY_UNLIMITED, - 'settings' => array( - 'allowed_values' => array( - array( - 'vid' => $vocabulary->vid, - 'parent' => 0, - ), - ), - ), - ); - field_create_field($field); -} - /** * Save a term object to the database. * -- cgit v1.2.3