From e59852d336467e7269853724a28d80bc070bcbf6 Mon Sep 17 00:00:00 2001 From: Dries Buytaert Date: Sun, 1 Jul 2007 17:41:16 +0000 Subject: - Rollback of patch #147723: delete API. Talked to Steven and Gabor and we unanimously agreed to rollback the deletion API. We all support the features this patch added, yet not its actual design and implementation. After some talk, we decided that it would be better for Drupal -- in the long term -- not to go with a solution that isn't 100%. We also recognize that in the short term, this patch would have been useful addition. So let's figure out how we can implement this properly in D7. --- modules/taxonomy/taxonomy.module | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) (limited to 'modules/taxonomy/taxonomy.module') diff --git a/modules/taxonomy/taxonomy.module b/modules/taxonomy/taxonomy.module index 71fc80bef..03c164b47 100644 --- a/modules/taxonomy/taxonomy.module +++ b/modules/taxonomy/taxonomy.module @@ -384,14 +384,13 @@ function taxonomy_vocabulary_confirm_delete(&$form_state, $vid) { $form['type'] = array('#type' => 'value', '#value' => 'vocabulary'); $form['vid'] = array('#type' => 'value', '#value' => $vid); $form['name'] = array('#type' => 'value', '#value' => $vocabulary->name); - - $options = array('description' => t('Deleting a vocabulary will delete all the terms in it. This action cannot be undone.')); - return confirm_form($form, t('Are you sure you want to delete the vocabulary %title?', array('%title' => $vocabulary->name)), 'admin/content/taxonomy', - $options); + t('Deleting a vocabulary will delete all the terms in it. This action cannot be undone.'), + t('Delete'), + t('Cancel')); } function taxonomy_vocabulary_confirm_delete_submit($form, &$form_state) { @@ -621,14 +620,13 @@ function taxonomy_term_confirm_delete(&$form_state, $tid) { $form['type'] = array('#type' => 'value', '#value' => 'term'); $form['name'] = array('#type' => 'value', '#value' => $term->name); $form['tid'] = array('#type' => 'value', '#value' => $tid); - - $options = array('description' => t('Deleting a term will delete all its children if there are any. This action cannot be undone.')); - return confirm_form($form, t('Are you sure you want to delete the term %title?', array('%title' => $term->name)), 'admin/content/taxonomy', - $options); + t('Deleting a term will delete all its children if there are any. This action cannot be undone.'), + t('Delete'), + t('Cancel')); } function taxonomy_term_confirm_delete_submit($form, &$form_state) { @@ -878,14 +876,14 @@ function taxonomy_node_save($node, $terms) { * Remove associations of a node to its terms. */ function taxonomy_node_delete($node) { - drupal_delete_add_query('DELETE FROM {term_node} WHERE nid = %d', $node->nid); + db_query('DELETE FROM {term_node} WHERE nid = %d', $node->nid); } /** * Remove associations of a node to its terms. */ function taxonomy_node_delete_revision($node) { - drupal_delete_add_query('DELETE FROM {term_node} WHERE vid = %d', $node->vid); + db_query('DELETE FROM {term_node} WHERE vid = %d', $node->vid); } /** -- cgit v1.2.3