summaryrefslogtreecommitdiff
path: root/modules/taxonomy
diff options
context:
space:
mode:
Diffstat (limited to 'modules/taxonomy')
-rw-r--r--modules/taxonomy/taxonomy.admin.inc2
-rw-r--r--modules/taxonomy/taxonomy.install2
-rw-r--r--modules/taxonomy/taxonomy.module4
-rw-r--r--modules/taxonomy/taxonomy.test3
4 files changed, 6 insertions, 5 deletions
diff --git a/modules/taxonomy/taxonomy.admin.inc b/modules/taxonomy/taxonomy.admin.inc
index 110d43d5b..c7dafe7d6 100644
--- a/modules/taxonomy/taxonomy.admin.inc
+++ b/modules/taxonomy/taxonomy.admin.inc
@@ -207,7 +207,7 @@ function taxonomy_form_vocabulary_submit($form, &$form_state) {
}
$vocabulary = (object) $form_state['values'];
if ($vocabulary->machine_name != $old_vocabulary->machine_name) {
- field_attach_rename_bundle($old_vocabulary->machine_name, $vocabulary->machine_name);
+ field_attach_rename_bundle('taxonomy_term', $old_vocabulary->machine_name, $vocabulary->machine_name);
}
switch (taxonomy_vocabulary_save($vocabulary)) {
case SAVED_NEW:
diff --git a/modules/taxonomy/taxonomy.install b/modules/taxonomy/taxonomy.install
index 5fd904cf4..17749dc5a 100644
--- a/modules/taxonomy/taxonomy.install
+++ b/modules/taxonomy/taxonomy.install
@@ -256,7 +256,7 @@ function taxonomy_update_7002() {
->fields(array('machine_name' => 'vocabulary_' . $vid))
->condition('vid', $vid)
->execute();
- field_attach_create_bundle($machine_name);
+ field_attach_create_bundle('taxonomy_term', $machine_name);
}
}
diff --git a/modules/taxonomy/taxonomy.module b/modules/taxonomy/taxonomy.module
index b7423f124..e22554107 100644
--- a/modules/taxonomy/taxonomy.module
+++ b/modules/taxonomy/taxonomy.module
@@ -314,7 +314,7 @@ function taxonomy_vocabulary_save($vocabulary) {
}
elseif (empty($vocabulary->vid)) {
$status = drupal_write_record('taxonomy_vocabulary', $vocabulary);
- field_attach_create_bundle($vocabulary->machine_name);
+ field_attach_create_bundle('taxonomy_term', $vocabulary->machine_name);
taxonomy_vocabulary_create_field($vocabulary);
module_invoke_all('taxonomy_vocabulary_insert', $vocabulary);
}
@@ -344,7 +344,7 @@ function taxonomy_vocabulary_delete($vid) {
taxonomy_term_delete($tid);
}
- field_attach_delete_bundle($vocabulary['machine_name']);
+ field_attach_delete_bundle('taxonomy_term', $vocabulary['machine_name']);
module_invoke_all('taxonomy', 'delete', 'vocabulary', $vocabulary);
cache_clear_all();
diff --git a/modules/taxonomy/taxonomy.test b/modules/taxonomy/taxonomy.test
index 6fd16dd18..b4e351371 100644
--- a/modules/taxonomy/taxonomy.test
+++ b/modules/taxonomy/taxonomy.test
@@ -665,7 +665,6 @@ class TaxonomyTermFieldTestCase extends TaxonomyWebTestCase {
$web_user = $this->drupalCreateUser(array('access field_test content', 'administer field_test content', 'administer taxonomy'));
$this->drupalLogin($web_user);
-
$this->vocabulary = $this->createVocabulary();
}
@@ -691,6 +690,7 @@ class TaxonomyTermFieldTestCase extends TaxonomyWebTestCase {
field_create_field($this->field);
$this->instance = array(
'field_name' => $this->field_name,
+ 'object_type' => 'test_entity',
'bundle' => FIELD_TEST_BUNDLE,
'widget' => array(
'type' => 'options_select',
@@ -749,6 +749,7 @@ class TaxonomyTermFieldTestCase extends TaxonomyWebTestCase {
field_create_field($this->field);
$this->instance = array(
'field_name' => $this->field_name,
+ 'object_type' => 'test_entity',
'bundle' => FIELD_TEST_BUNDLE,
'label' => $this->randomName() . '_label',
'widget' => array(