89c89 < index 4eadf5a..a491be0 100644 --- > index 191b519..c495a1e 100644 92c92 < @@ -14,6 +14,21 @@ --- > @@ -6,6 +6,21 @@ 108c108 < +const TAXONOMY_HIERARCHY_MULTIPLE = 2; --- > +const TAXONOMY_HIERARCHY_MULTIPLE = 2; 111,123c111,129 < * Implements hook_help(). < */ < function taxonomy_help($path, $arg) { < @@ -456,7 +471,7 @@ function taxonomy_vocabulary_delete($vid) { < $transaction = db_transaction(); < try { < // Only load terms without a parent, child terms will get deleted too. < - $result = db_query('SELECT t.tid FROM {taxonomy_term_data} t INNER JOIN {taxonomy_term_hierarchy} th ON th.tid = t.tid WHERE t.vid = :vid AND th.parent = 0', array(':vid' => $vid))->fetchCol(); < + $result = db_query('SELECT t.tid FROM {taxonomy_term_data} t INNER JOIN {taxonomy_term_hierarchy} th ON th.tid = t.tid WHERE t.vid = :vid AND th.parent = :thparent', array(':vid' => $vid, ':thparent' => TAXONOMY_HIERARCHY_DISABLED))->fetchCol(); < foreach ($result as $tid) { < taxonomy_term_delete($tid); < } < @@ -510,10 +525,11 @@ function taxonomy_taxonomy_vocabulary_update($vocabulary) { --- > * Users can create new terms in a free-tagging vocabulary when > * submitting a taxonomy_autocomplete_widget. We store a term object > * whose tid is 'autocreate' as a field data item during widget > @@ -51,11 +66,11 @@ function taxonomy_help($path, $arg) { > case 'admin/structure/taxonomy/%': > $vocabulary = taxonomy_vocabulary_machine_name_load($arg[3]); > switch ($vocabulary->hierarchy) { > - case 0: > + case TAXONOMY_HIERARCHY_DISABLED: > return '
' . 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)) . '
'; > - case 1: > + case TAXONOMY_HIERARCHY_SINGLE: > return '' . t('%capital_name contains terms grouped under parent terms. You can reorganize the terms in %capital_name using their drag-and-drop handles.', array('%capital_name' => drupal_ucfirst($vocabulary->name), '%name' => $vocabulary->name)) . '
'; > - case 2: > + case TAXONOMY_HIERARCHY_MULTIPLE: > return '' . t('%capital_name contains terms with multiple parents. Drag and drop of terms with multiple parents is not supported, but you can re-enable drag-and-drop support by editing each term to include only a single parent.', array('%capital_name' => drupal_ucfirst($vocabulary->name))) . '
'; > } > }