$description=t('The !name vocabulary of the node. If this is a "Tags" vocabulary, any new terms will be created on import. Otherwise only existing terms will be used. If this is not a "Tags" vocabulary and not a "Multiple select" vocabulary, only the first available term will be created. See !settings.',array('!name'=>$vocab->name,'!settings'=>l(t('vocabulary settings'),'admin/content/taxonomy/edit/vocabulary/'.$vocab->vid,array('query'=>'destination='.$_GET['q']))));
$description=t('The !name vocabulary of the node. If this is a "Tags" vocabulary, any new terms will be created on import. Otherwise only existing terms will be used. If this is not a "Tags" vocabulary and not a "Multiple select" vocabulary, only the first available term will be created. See !settings.',array('!name'=>$vocabulary->name,'!settings'=>l(t('vocabulary settings'),'admin/content/taxonomy/edit/vocabulary/'.$vocabulary->vid,array('query'=>'destination='.$_GET['q']))));
$targets['taxonomy:'.$vocab->vid]=array(
'name'=>"Taxonomy: ".$vocab->name,
$targets['taxonomy:'.$vocabulary->vid]=array(
'name'=>"Taxonomy: ".$vocabulary->name,
'callback'=>'taxonomy_feeds_set_target',
'description'=>$description,
'real_target'=>'taxonomy',
...
...
@@ -98,36 +96,36 @@ function taxonomy_feeds_set_target(&$node, $key, $terms) {
}
// Load target vocabulary to check, if it has the "tags" flag.
$vocab_id=(int)str_replace('taxonomy:','',$key);
$vocab=taxonomy_vocabulary_load($vocab_id);
$vid=(int)str_replace('taxonomy:','',$key);
$vocabulary=taxonomy_vocabulary_load($vid);
// Cast a given single string to an array so we can use it.
if(!is_array($terms)){
$terms=array($terms);
}
if($vocab->tags){
if($vocabulary->tags){
// Simply add a comma separated list to the node for a "tags" vocabulary.