$this->assertTrue($this->xpath('//select[@name="fields[_add_existing_field][field_name]"]//option[@value="'.$this->field_name.'"]'),'Existing field was found in taxonomy term fields.');
$this->assertRaw(t('Are you sure you want to delete the vocabulary %name?',array('%name'=>$vocabulary->name)),'[confirm deletion] Asks for confirmation.');
$this->assertText(t('Deleting a vocabulary will delete all the terms in it. This action cannot be undone.'),'[confirm deletion] Inform that all terms will be deleted.');
// Make sure that the machine name of the vocabulary is not in the
// disallowed list (names that conflict with menu items, such as 'list'
// and 'add').
// During the deletion there is no 'vid' key.
if(isset($form_state['values']['vid'])){
// Do not allow machine names to conflict with taxonomy path arguments.
$vid=$form_state['values']['vid'];
$disallowed=array('add','list');
if(in_array($vid,$disallowed)){
form_set_error('vid',t('The machine-readable name cannot be "add" or "list".'));
}
}
}
/**
* Submit handler to update the bundle for the default language configuration.
*/
...
...
@@ -172,13 +152,13 @@ public function save(array $form, array &$form_state) {
switch(taxonomy_vocabulary_save($vocabulary)){
caseSAVED_NEW:
drupal_set_message(t('Created new vocabulary %name.',array('%name'=>$vocabulary->name)));
watchdog('taxonomy','Created new vocabulary %name.',array('%name'=>$vocabulary->name),WATCHDOG_NOTICE,l(t('edit'),'admin/structure/taxonomy/'.$vocabulary->id().'/edit'));
watchdog('taxonomy','Created new vocabulary %name.',array('%name'=>$vocabulary->name),WATCHDOG_NOTICE,l(t('edit'),'admin/structure/taxonomy/manage/'.$vocabulary->id().'/edit'));
@@ -68,8 +68,8 @@ function taxonomy_help($path, $arg) {
case'admin/structure/taxonomy':
$output='<p>'.t('Taxonomy is for categorizing content. Terms are grouped into vocabularies. For example, a vocabulary called "Fruit" would contain the terms "Apple" and "Banana".').'</p>';
return$output;
case'admin/structure/taxonomy/%':
$vocabulary=taxonomy_vocabulary_load($arg[3]);
case'admin/structure/taxonomy/manage/%':
$vocabulary=taxonomy_vocabulary_load($arg[4]);
switch($vocabulary->hierarchy){
caseTAXONOMY_HIERARCHY_DISABLED:
return'<p>'.t('You can reorganize the terms in %capital_name using their drag-and-drop handles, and group terms under a parent term by sliding them under and to the right of the parent.',array('%capital_name'=>drupal_ucfirst($vocabulary->name),'%name'=>$vocabulary->name)).'</p>';
...
...
@@ -128,7 +128,7 @@ function taxonomy_entity_bundle_info() {