X-Git-Url: https://scripts.mit.edu/gitweb/autoinstalls/wordpress.git/blobdiff_plain/0461a5f2e55c8d5f1fde96ca2e83117152573c7d..9e77185fafaf4e60e2b73821e0e4b9b1a11fb85f:/wp-admin/network.php diff --git a/wp-admin/network.php b/wp-admin/network.php index c7b115f6..e5046f9b 100644 --- a/wp-admin/network.php +++ b/wp-admin/network.php @@ -39,8 +39,11 @@ foreach ( $wpdb->tables( 'ms_global' ) as $table => $prefixed_table ) */ function network_domain_check() { global $wpdb; - if ( $wpdb->get_var( "SHOW TABLES LIKE '$wpdb->site'" ) ) + + $sql = $wpdb->prepare( "SHOW TABLES LIKE %s", $wpdb->esc_like( $wpdb->site ) ); + if ( $wpdb->get_var( $sql ) ) { return $wpdb->get_var( "SELECT domain FROM $wpdb->site ORDER BY id ASC LIMIT 1" ); + } return false; } @@ -153,7 +156,7 @@ function network_step1( $errors = false ) { if ( defined('DO_NOT_UPGRADE_GLOBAL_TABLES') ) { echo '
' . __('ERROR:') . ' ' . __( 'The constant DO_NOT_UPGRADE_GLOBAL_TABLES cannot be defined when creating a network.' ) . '
+ | site1.%1$s and site2.%1$s ', 'subdomain examples' ), $hostname ); ?> |
|
---|---|---|
+ | %1$s/site1 and %1$s/site2 ', 'subdirectory examples' ), $hostname ); ?> |