Commit 77af1955 authored by Dries's avatar Dries
Browse files

- Patch #581764 by swentel, bjaspan: default profile incorrectly created 'tags' vocabulary.

parent b7affdab
...@@ -115,7 +115,7 @@ function default_install() { ...@@ -115,7 +115,7 @@ function default_install() {
foreach ($values as $record) { foreach ($values as $record) {
$query->values($record); $query->values($record);
} }
$query->execute(); $query->execute();
// Insert default user-defined node types into the database. For a complete // Insert default user-defined node types into the database. For a complete
// list of available node type attributes, refer to the node type API // list of available node type attributes, refer to the node type API
...@@ -175,23 +175,20 @@ function default_install() { ...@@ -175,23 +175,20 @@ function default_install() {
variable_set('theme_settings', $theme_settings); variable_set('theme_settings', $theme_settings);
// Create a default vocabulary named "Tags", enabled for the 'article' content type. // Create a default vocabulary named "Tags", enabled for the 'article' content type.
$description = st('Use tags to group articles on similar topics into categories.'); $vocabulary = new stdClass;
$help = st('Enter a comma-separated list of words to describe your content.'); $vocabulary->name = 'Tags';
$vocabulary->description = st('Use tags to group articles on similar topics into categories.');
$vid = db_insert('taxonomy_vocabulary')->fields(array( $vocabulary->machine_name = 'tags';
'name' => 'Tags', $vocabulary->help = st('Enter a comma-separated list of words to describe your content.');
'description' => $description, $vocabulary->relations = 0;
'machine_name' => 'tags', $vocabulary->hierarchy = 0;
'help' => $help, $vocabulary->multiple = 0;
'relations' => 0, $vocabulary->required = 0;
'hierarchy' => 0, $vocabulary->tags = 1;
'multiple' => 0, $vocabulary->module = 'taxonomy';
'required' => 0, $vocabulary->weight = 0;
'tags' => 1, $vocabulary->nodes = array('article' => 'article');
'module' => 'taxonomy', taxonomy_vocabulary_save($vocabulary);
'weight' => 0,
))->execute();
db_insert('taxonomy_vocabulary_node_type')->fields(array('vid' => $vid, 'type' => 'article'))->execute();
// Enable default permissions for system roles. // Enable default permissions for system roles.
user_role_grant_permissions(DRUPAL_ANONYMOUS_RID, array('access content', 'use text format 1')); user_role_grant_permissions(DRUPAL_ANONYMOUS_RID, array('access content', 'use text format 1'));
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment