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

git-svn-id: https://develop.svn.wordpress.org/trunk@14096 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Andrew Nacin 2010-04-15 21:49:42 +00:00
parent 08d47899a5
commit 82358ca36e
1 changed files with 3 additions and 0 deletions

View File

@ -32,6 +32,9 @@ if ( !defined('WP_ALLOW_REPAIR') ) {
$okay = true;
$tables = $wpdb->tables();
// Sitecategories may not exist if global terms are disabled.
if ( is_multisite() && ! $wpdb->get_var( "SHOW TABLES LIKE '$wpdb->sitecategories'" ) )
unset( $tables['sitecategories'] );
$tables = array_merge( $tables, (array) apply_filters( 'tables_to_repair', array() ) ); // Return tables with table prefixes.
// Loop over the tables, checking and repairing as needed.
foreach ( $tables as $table ) {