function _bc_copy_taxonomy_save in Bundle Copy 7.2
Same name and namespace in other branches
- 7 bundle_copy.module \_bc_copy_taxonomy_save()
Helper function to save the taxonomy.
1 string reference to '_bc_copy_taxonomy_save'
- bundle_copy_bundle_copy_info in ./
bundle_copy.module - Implements hook_bundle_copy_info().
File
- ./
bundle_copy.module, line 623 - Bundle copy.
Code
function _bc_copy_taxonomy_save($bundle) {
if ($bundle->vid) {
unset($bundle->vid);
}
$vid = db_query('SELECT vid FROM {taxonomy_vocabulary} WHERE machine_name = :machine_name', array(
':machine_name' => $bundle->machine_name,
))
->fetchField();
if ($vid) {
$bundle->vid = $vid;
}
taxonomy_vocabulary_save($bundle);
}