Make WordPress Core

Changeset 14096


Ignore:
Timestamp:
04/15/2010 09:49:42 PM (15 years ago)
Author:
nacin
Message:

Don't try to repair sitecategories if it doesn't exist. Global terms may be disabled, though we can't check that without a DB Call. fixes #12964

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/maint/repair.php

    r13523 r14096  
    3333
    3434    $tables = $wpdb->tables();
     35    // Sitecategories may not exist if global terms are disabled.
     36    if ( is_multisite() && ! $wpdb->get_var( "SHOW TABLES LIKE '$wpdb->sitecategories'" ) )
     37        unset( $tables['sitecategories'] );
    3538    $tables = array_merge( $tables, (array) apply_filters( 'tables_to_repair', array() ) ); // Return tables with table prefixes.
    3639    // Loop over the tables, checking and repairing as needed.
Note: See TracChangeset for help on using the changeset viewer.