Make WordPress Core

Opened 14 years ago

Closed 14 years ago

Last modified 14 years ago

#12083 closed defect (bug) (fixed)

Merge is_installed() into wp_not_installed() and is_blog_installed()

Reported by: nacin's profile nacin Owned by:
Milestone: 3.0 Priority: normal
Severity: normal Version:
Component: Multisite Keywords:
Focuses: Cc:

Description (last modified by nacin)

wp_not_installed() checks is_blog_installed(), and if we're not installed (or installing), we die on error.

The MU/MS function is_installed() runs when not installing and when !$current_site && !current_blog.

We should be able to merge the largely overlapping functionality quite a bit and remove is_installed() entirely.

Also, we might want to consider introducing multisite tables to the list of tables to check for in is_blog_installed(), and/or allow repair.php to help when multisite.

We also don't need to check tables in $wpdb->old_tables, so if nothing else comes out of this ticket then that should go in. repair.php has a simple if ( in_array( $table, $wpdb->old_tables ) ) continue;, and the functionality should be consistent.

We should also check for $wpdb->site instead of or in addition to $wpdb->options if multisite, the way is_installed() does.

Attachments (1)

global_tables.diff (12.1 KB) - added by nacin 14 years ago.

Download all attachments as: .zip

Change History (9)

#1 @nacin
14 years ago

(In [13224]) First pass at Multisite support in DB repair. When MS, include main blog tables; when not MS, include non-MS global tables (users, usermeta). See #12083

14 years ago

#2 @nacin
14 years ago

(In [13229]) Introduce wpdb::tables() to fetch table names on a global or blog scope. Remove very old and long deprecated $table{table} globals, fixes #11614. See #12083

#3 @automattor
14 years ago

(In [13245]) Fix wpdb::tables() prefix handling. Ensures PHP4 compat. See #12083

#4 @nacin
14 years ago

(In [13253]) Rename is_installed() to ms_not_installed(). See #12083

#5 @nacin
14 years ago

After going over all of this again, I'm not sure how much more we ought to do here. Recommend closing as fixed.

#6 @nacin
14 years ago

  • Description modified (diff)
  • Resolution set to fixed
  • Status changed from new to closed

wpmuguru and I agreed there's no need to account for the renaming of is_installed().

Closing this one out.

#7 @nacin
14 years ago

(In [13324]) Improvements and fixes to wpdb::tables(). See #12083 see #11644

#8 @nacin
14 years ago

(In [13569]) Ignore custom user tables when checking whether the blog is installed. see #12083

Note: See TracTickets for help on using tickets.