Index: taxonomy_xml.module =================================================================== --- taxonomy_xml.module (revision 112) +++ taxonomy_xml.module (revision 116) @@ -529,18 +529,36 @@ * * @return the new vocab object. */ -function _taxonomy_xml_get_vocabulary_placeholder($name) { +function _taxonomy_xml_get_vocabulary_placeholder($name, $_tx_vocabulary = array()) { if ($vocabulary = taxonomy_xml_get_vocabulary_by_name($name)) { return $vocabulary; } // Create new vocab $vocabulary = array( - 'name' => $name, - 'relations' => TRUE, - 'hierarchy' => 2, + 'name' => $name, + 'description' => $_tx_vocabulary['description'], + 'help' => $_tx_vocabulary['help'], + 'relations' => $_tx_vocabulary['relations'], + 'hierarchy' => $_tx_vocabulary['hierarchy'], + 'multiple' => $_tx_vocabulary['multiple'], + 'required' => $_tx_vocabulary['required'], + 'tags' => $_tx_vocabulary['tags'], + 'module' => $_tx_vocabulary['module'], + 'weight' => $_tx_vocabulary['weight'], ); + // Set vocabulary node types + if (!empty($_tx_vocabulary['nodes'])) { + $node_types = explode(',', $_tx_vocabulary['nodes']); + if (count($node_types) > 0) { + $vocabulary['nodes'] = array(); + foreach ($node_types as $type) { + $vocabulary['nodes'][$type] = 1; + } + } + } + module_invoke('taxonomy', 'save_vocabulary', $vocabulary); // Need to retrieve it from DB again - the result isn't given back to us.