mirror of
https://github.com/WordPress/WordPress.git
synced 2024-12-23 01:27:36 +01:00
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: http://svn.automattic.com/wordpress/trunk@14096 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
436232d505
commit
c7a7a7f155
@ -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 ) {
|
||||
|
Loading…
Reference in New Issue
Block a user