Make WordPress Core

Opened 14 years ago

Closed 14 years ago

#10728 closed defect (bug) (fixed)

Improve is_blog_installed() check and add means of automatically repairing tables

Reported by: ryan's profile ryan Owned by: ryan's profile ryan
Milestone: 2.9 Priority: normal
Severity: normal Version: 2.9
Component: Database Keywords:
Focuses: Cc:

Description

Improve is_blog_installed() check so that it reflects when the database tables are in an insane state. Instead of getting confused and offering to scratch install WP again, it should put up message on admin page visits that links to a page that will attempt to automatically repair tables.

Attachments (1)

10728.diff (5.4 KB) - added by ryan 14 years ago.

Download all attachments as: .zip

Change History (8)

@ryan
14 years ago

#1 @westi
14 years ago

Looks good.

I would rename the REPAIR define to something WP'y like WP_ALLOW_REPAIR for example.

#2 @ryan
14 years ago

Will do.

#3 @azaozz
14 years ago

Was thinking we could exit or maybe redirect to the dashboard when is_blog_installed is true and WP_REPAIRING is set (meaning someone is running repair.php directly). But that would prevent the user from repairing other tables.

Perhaps we need to cover two more user cases:

  • allow admins to run repair.php for cases when wp_posts, wp_comments, wp_terms, etc. need repairs
  • if wp_users or wp_usermeta fail, offer to try to repair them the same way as wp_options.

#4 @ryan
14 years ago

(In [11902]) is_blog_installed() improvements and repair.php. see #10728

#5 @ryan
14 years ago

First round committed. I'll work on azaozz's suggestions next.

#6 @scribu
14 years ago

  • Milestone changed from Unassigned to 2.9

#7 @ryan
14 years ago

  • Resolution set to fixed
  • Status changed from new to closed
Note: See TracTickets for help on using tickets.