mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-11 12:20:22 +00:00
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
git-svn-id: https://develop.svn.wordpress.org/trunk@13229 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -1827,12 +1827,13 @@ function is_blog_installed() {
|
||||
$tables = $wpdb->get_col('SHOW TABLES');
|
||||
$wpdb->suppress_errors( $suppress );
|
||||
|
||||
$wp_tables = $wpdb->tables( 'all', true );
|
||||
// Loop over the WP tables. If none exist, then scratch install is allowed.
|
||||
// If one or more exist, suggest table repair since we got here because the options
|
||||
// table could not be accessed.
|
||||
foreach ($wpdb->tables as $table) {
|
||||
foreach ( $wp_tables as $table ) {
|
||||
// If one of the WP tables exist, then we are in an insane state.
|
||||
if ( in_array($wpdb->prefix . $table, $tables) ) {
|
||||
if ( in_array( $table, $tables ) ) {
|
||||
// If visiting repair.php, return true and let it take over.
|
||||
if ( defined('WP_REPAIRING') )
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user