Based on the comments in http://drupal.org/node/84076 and http://drupal.org/node/83007, the workflow of deleting forum and multiple comments can be improved. The workflow of deleting multiple users can also be improved.
This patch does the following for deleting multiple comments, multiple users, and forum/container:
1. Designate separate menu callback for deletion of forums, comments, and users respectively.
2. Operation will be checked at the _submit hook of the admin overview page of each module. The respective delete menu callback will be called accordingly.
3. Usage of $_POST along the process was removed.
For comment and user module only:
1. Since $_POST is not used anymore, the array of multiple comments and users cannot be passed to the callback. To solve this, cid of comments and uid of users are appended respectively at the end of the delete menu item, imploded with the '+' symbol.
2. The string of cids/uids are exploded into arrays at the callback function. The deletion process after that remains the same.
The confirm form for deleting forum/container was also changed to reflect the type of term to be deleted.
Please review, maybe the patch could be improved further or maybe breaking it up is better?
| Comment | File | Size | Author |
|---|---|---|---|
| #11 | improved_comment_delete_workflow_2.patch | 3.56 KB | edmund.kwok |
| #10 | improved_user_delete_workflow_3.patch | 2.87 KB | edmund.kwok |
| #8 | improved_user_delete_workflow_2.patch | 2.87 KB | edmund.kwok |
| #6 | improved_forum_delete_workflow.patch | 5.72 KB | edmund.kwok |
| #5 | improved_user_delete_workflow.patch | 2.87 KB | edmund.kwok |
Comments
Comment #1
edmund.kwok commentedBetter title.
Comment #2
edmund.kwok commentedPrevious patch didn't work for multiple delete because I was not aware that '+' might be parsed as ' '. In this patch, ',' comma was used instead, following taxonomy module where ',' means 'and' instead of using '+' which means 'or'. Also changed the delete forum/container's callback argument to only the form_id.
Comment #3
drummCan you post patches to each of the three files separately. I'd rather review and test one change at a time than three.
Comment #4
edmund.kwok commentedFor comment.module.
Comment #5
edmund.kwok commentedFor user.module
Comment #6
edmund.kwok commentedFor forum.module. Rerolled to latest HEAD version since the interim fix got in.
Comment #7
edmund.kwok commentedChanging status...
Comment #8
edmund.kwok commentedRerolling to latest HEAD for user.module. Please reset your menu cache before testing the changes.
Changing the title to reflect overall changes of patch.
Comment #9
drummpatching file modules/user/user.module
Hunk #1 FAILED at 723.
Hunk #2 succeeded at 2099 (offset 33 lines).
Hunk #3 succeeded at 2256 (offset 71 lines).
Hunk #4 FAILED at 2332.
patch unexpectedly ends in middle of line
2 out of 4 hunks FAILED -- saving rejects to file modules/user/user.module.rej
patch unexpectedly ends in middle of line
Comment #10
edmund.kwok commentedRerolled to HEAD.
Comment #11
edmund.kwok commentedPatch for comment.module. Rerolled to head. Also removed content_admin() since it's not longer required with the separate menu callbacks.
Comment #12
catchGreat idea, doesn't apply unfortunately. Any chance of this getting into D6 for usability?
Comment #13
mxer269 commentedIs this patch what I need? I am unable to delete my forums and forum containers. I am having trouble assigning a URL alias to my forum link as well, although I've done it correctly. Nothing shows up when you click the forum link.
Comment #14
mxer269 commentedThe forum does not show when I set a URL alias to the forum
Comment #15
mxer269 commentedbump for help pls
Comment #16
multiplextor commentedClosed. The reason: expired.