summaryrefslogtreecommitdiff
path: root/profiles
diff options
context:
space:
mode:
authorAngie Byron <webchick@24967.no-reply.drupal.org>2009-10-08 07:58:47 +0000
committerAngie Byron <webchick@24967.no-reply.drupal.org>2009-10-08 07:58:47 +0000
commitc4e1242e92f3bcedc15a663821e080dcea4be4b8 (patch)
tree59215bf056869efb33af429e78aed6660dc80efe /profiles
parentf5b02199c737d7a2de051d479de703a2176b1cbe (diff)
downloadbrdo-c4e1242e92f3bcedc15a663821e080dcea4be4b8.tar.gz
brdo-c4e1242e92f3bcedc15a663821e080dcea4be4b8.tar.bz2
#412518 by catch, bangpound, and yched: Convert taxonomy_node_* to field API (with upgrade path). Say buh-bye to old, crusty code.
Diffstat (limited to 'profiles')
-rw-r--r--profiles/default/default.install32
1 files changed, 19 insertions, 13 deletions
diff --git a/profiles/default/default.install b/profiles/default/default.install
index 8831f5435..04a3496b0 100644
--- a/profiles/default/default.install
+++ b/profiles/default/default.install
@@ -175,20 +175,26 @@ function default_install() {
variable_set('theme_settings', $theme_settings);
// Create a default vocabulary named "Tags", enabled for the 'article' content type.
- $vocabulary = new stdClass;
- $vocabulary->name = 'Tags';
- $vocabulary->description = st('Use tags to group articles on similar topics into categories.');
- $vocabulary->machine_name = 'tags';
- $vocabulary->help = st('Enter a comma-separated list of words to describe your content.');
- $vocabulary->relations = 0;
- $vocabulary->hierarchy = 0;
- $vocabulary->multiple = 0;
- $vocabulary->required = 0;
- $vocabulary->tags = 1;
- $vocabulary->module = 'taxonomy';
- $vocabulary->weight = 0;
- $vocabulary->nodes = array('article' => 'article');
+ $description = st('Use tags to group articles on similar topics into categories.');
+ $help = st('Enter a comma-separated list of words to describe your content.');
+ $vocabulary = (object) array(
+ 'name' => 'Tags',
+ 'description' => $description,
+ 'machine_name' => 'tags',
+ 'help' => $help,
+ 'weight' => 0,
+ );
taxonomy_vocabulary_save($vocabulary);
+ $instance = array(
+ 'field_name' => 'taxonomy_' . $vocabulary->machine_name,
+ 'label' => $vocabulary->name,
+ 'bundle' => 'article',
+ 'description' => $vocabulary->help,
+ 'widget' => array(
+ 'type' => 'taxonomy_autocomplete',
+ ),
+ );
+ field_create_instance($instance);
// Enable default permissions for system roles.
user_role_grant_permissions(DRUPAL_ANONYMOUS_RID, array('access content', 'use text format 1'));