Opened 16 years ago
Last modified 6 years ago
#7965 new enhancement
Database upgrade complete message should be an admin notice
Reported by: | westi | Owned by: | |
---|---|---|---|
Milestone: | Future Release | Priority: | normal |
Severity: | normal | Version: | |
Component: | Upgrade/Install | Keywords: | has-patch needs-refresh |
Focuses: | ui, administration | Cc: |
Description
When a database upgrade is complete we should just take you to the page you wanted to see and should an upgrade_complete admin notice instead of requiring another button click
Attachments (1)
Change History (13)
#2
@
16 years ago
- Component changed from Administration to Upgrade/Install
- Owner anonymous deleted
- Type changed from defect (bug) to enhancement
#5
@
13 years ago
- Keywords has-patch added; needs-patch removed
- Milestone changed from Future Release to 3.3
After some discussion, we don't actually need any more UI here at all. Database upgrades are never intensive anymore, and if they ever would be for some major migration in the future, we can either add code back or do it in some async fashion. And they're safe.
Attached patch neuters upgrade.php and moves relevant upgrade code to admin.php. The upgrade.php file can't strictly be deleted since multisite still uses it.
At some point it would be nice to not be calling delete_site_transient() on ever multisite call, and to eventually just kill off this file.
#6
@
13 years ago
Patch seems to work for me, I've only tested on a Single site instance however.
The only things which it doesn't catch, is
- Notifying the user that an upgrade took place
- Notifying the user of any errors which occurred during the upgrade
Occasionally with WP_DEBUG enabled, I'll see Database errors (ie. Index already defined) that sort of thing is going to be missed with this patch added. Whilst it's not going to be an issue for small sites, it could theoretically cause an issue for some.
I feel like using the Settings Notice API for the latter part somehow..
#7
@
13 years ago
Since we normally trigger it without showing error messages, I'm not sure capturing these is worth the extra development.
#8
@
13 years ago
Looks like the patch might need a tweak in the multisite branch. Just a matter of unifying it in terms of require's, etc.
#9
@
13 years ago
Since we normally trigger it without showing error messages, I'm not sure capturing these is worth the extra development.
That's a fair enough point. The redirection will have to be issued before the upgrade takes place then, to ensure that output from functions doesn't cause 'headers already sent' issue.
The db_upgraded option that is checked in admin.php makes this easier.