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/user/user.module | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) (limited to 'modules/user/user.module') diff --git a/modules/user/user.module b/modules/user/user.module index 188884290..baab4e935 100644 --- a/modules/user/user.module +++ b/modules/user/user.module @@ -1621,15 +1621,12 @@ function user_edit($form_state, $category = 'account') { return $form; } -function user_confirm_delete(&$form_state, $name, $uid) { - $options = array( - 'description' => t('All submissions made by this user will be attributed to the anonymous account. This action cannot be undone.'), - 'cancel' => 'user/'. $uid, - ); +function user_confirm_delete($name, $uid) { + $options = array('description' => t('All submissions made by this user will be attributed to the anonymous account. This action cannot be undone.')); return confirm_form(array(), t('Are you sure you want to delete the account %name?', array('%name' => $name)), - 'admin/user/user', + 'user/'. $uid, $options); } @@ -1863,7 +1860,10 @@ function user_admin_access_delete_confirm($aid = 0) { $form['aid'] = array('#type' => 'hidden', '#value' => $aid); $output = confirm_form($form, t('Are you sure you want to delete the @type rule for %rule?', array('@type' => $access_types[$edit->type], '%rule' => $edit->mask)), - 'admin/user/rules'); + 'admin/user/rules', + t('This action cannot be undone.'), + t('Delete'), + t('Cancel')); return $output; } @@ -2464,11 +2464,10 @@ function user_multiple_delete_confirm(&$form_state) { } $form['operation'] = array('#type' => 'hidden', '#value' => 'delete'); - $options = array('yes' => t('Delete all')); - return confirm_form($form, t('Are you sure you want to delete these users?'), - 'admin/user/user', $options); + 'admin/user/user', t('This action cannot be undone.'), + t('Delete all'), t('Cancel')); } function user_multiple_delete_confirm_submit($form, &$form_state) { -- cgit v1.2.3