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/forum/forum.module | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'modules/forum/forum.module') diff --git a/modules/forum/forum.module b/modules/forum/forum.module index 1352911b8..09519e390 100644 --- a/modules/forum/forum.module +++ b/modules/forum/forum.module @@ -169,7 +169,7 @@ function forum_perm() { function forum_nodeapi(&$node, $op, $teaser, $page) { switch ($op) { case 'delete revision': - drupal_delete_add_query('DELETE FROM {forum} WHERE vid = %d', $node->vid); + db_query('DELETE FROM {forum} WHERE vid = %d', $node->vid); break; } } @@ -453,7 +453,7 @@ function forum_insert($node) { * Implementation of hook_delete(). */ function forum_delete(&$node) { - drupal_delete_add_query('DELETE FROM {forum} WHERE nid = %d', $node->nid); + db_query('DELETE FROM {forum} WHERE nid = %d', $node->nid); } /** @@ -610,9 +610,7 @@ function forum_confirm_delete(&$form_state, $tid) { $form['tid'] = array('#type' => 'value', '#value' => $tid); $form['name'] = array('#type' => 'value', '#value' => $term->name); - $options = array('description' => t('Deleting a forum or container will delete all sub-forums and associated posts as well. This action cannot be undone.')); - - return confirm_form($form, t('Are you sure you want to delete the forum %name?', array('%name' => $term->name)), 'admin/content/forum', $options); + return confirm_form($form, t('Are you sure you want to delete the forum %name?', array('%name' => $term->name)), 'admin/content/forum', t('Deleting a forum or container will delete all sub-forums and associated posts as well. This action cannot be undone.'), t('Delete'), t('Cancel')); } /** -- cgit v1.2.3