Opened 16 years ago
Closed 16 years ago
#9835 closed defect (bug) (fixed)
Plugin Delete action link
Reported by: | dd32 | Owned by: | |
---|---|---|---|
Milestone: | 2.8 | Priority: | normal |
Severity: | normal | Version: | 2.8 |
Component: | UI | Keywords: | has-patch |
Focuses: | Cc: |
Description
Patch adds a Delete action link to inactive plugins.
Patch also flicks user back to the 'All Plugins' page when the page they were on no longer contains any plugins (eg. If they've deleted all the plugins for that view)
Attachments (2)
Change History (8)
#2
@
16 years ago
The issue of the paging being mangled is a bit of a problem with the paging code IMO.. The fact that it expects all current url params should be passed.
Still, An updated patch which uses a temporary transient to cache the deletion result past a wp_redirect() is attached in a moment.
I have a feeling that $_SERVERREQUEST_URI? needs to have &deleted=true &updated=true, and all the other get variables removed so as to allow paging/screen options/other url's using add_query_arg() off the current URI to work as expected. - I'll probably make another ticket for that in a moment.
#3
@
16 years ago
- Keywords has-patch added; needs-patch removed
attachment 9835.2.diff added
- Same as before
- Implements a transient cache for the plugin deletion status.
- Cleans up the Request_URI from temporary variables for paging/screen options
- May need to check up that this hasn't been overlooked on other pages - Quite a few of the older pages include that code, some may not include them.. particularly when functionalities have been since added
#4
@
16 years ago
Patch looks good.
I wonder whether we should make the transient keyed on user_id as well to ensure we don't get clashing keys with multiple users accessing the admin at the sametime.
#5
@
16 years ago
I wonder whether we should make the transient keyed on user_id as well to ensure we don't get clashing keys with multiple users accessing the admin at the sametime.
mmm Sounds like a good idea, Its highly unlikely 2 admin users would delete plugins within a few milliseconds of eachother, but its still a possibility. (Note, That accesing the plugin page isnt enough to trigger the message, it also has to have the ?deleted arg present)
If you want to commit, throw a $user_ID in there :)
Currently with this patch applied once you delete a plugin the navigation on the plugins page get wrecked as the navigation links turn into delete links.
Looking at the code this looks like a general issue with the delete case.
This doesn't happen with the bulk delete.
I guess we may need a wp_redirect() call at the end of the delete action.