Changeset 55866
- Timestamp:
- 05/29/2023 04:24:43 PM (19 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/includes/schema.php
r54891 r55866 39 39 $charset_collate = $wpdb->get_charset_collate(); 40 40 41 if ( $blog_id && $blog_id != $wpdb->blogid ) {41 if ( $blog_id && (int) $blog_id !== $wpdb->blogid ) { 42 42 $old_blog_id = $wpdb->set_blog_id( $blog_id ); 43 43 } … … 984 984 global $wpdb, $current_site, $wp_rewrite; 985 985 986 $network_id = (int) $network_id; 987 986 988 $errors = new WP_Error(); 987 989 if ( '' === $domain ) { … … 995 997 $network_exists = false; 996 998 if ( is_multisite() ) { 997 if ( get_network( (int)$network_id ) ) {999 if ( get_network( $network_id ) ) { 998 1000 $errors->add( 'siteid_exists', __( 'The network already exists.' ) ); 999 1001 } 1000 1002 } else { 1001 if ( $network_id == $wpdb->get_var( $wpdb->prepare( "SELECT id FROM $wpdb->site WHERE id = %d", $network_id ) ) ) { 1003 if ( $network_id === (int) $wpdb->get_var( 1004 $wpdb->prepare( "SELECT id FROM $wpdb->site WHERE id = %d", $network_id ) 1005 ) ) { 1002 1006 $errors->add( 'siteid_exists', __( 'The network already exists.' ) ); 1003 1007 } … … 1012 1016 } 1013 1017 1014 if ( 1 == $network_id ) {1018 if ( 1 === $network_id ) { 1015 1019 $wpdb->insert( 1016 1020 $wpdb->site, … … 1041 1045 ); 1042 1046 1043 $site_user = get_userdata( (int) $wpdb->get_var( $wpdb->prepare( "SELECT meta_value FROM $wpdb->sitemeta WHERE meta_key = %s AND site_id = %d", 'admin_user_id', $network_id ) ) ); 1047 $site_user = get_userdata( 1048 (int) $wpdb->get_var( 1049 $wpdb->prepare( 1050 "SELECT meta_value 1051 FROM $wpdb->sitemeta 1052 WHERE meta_key = %s AND site_id = %d", 1053 'admin_user_id', 1054 $network_id 1055 ) 1056 ) 1057 ); 1044 1058 1045 1059 /* … … 1103 1117 if ( is_wp_error( $page ) ) { 1104 1118 $errstr = $page->get_error_message(); 1105 } elseif ( 200 == wp_remote_retrieve_response_code( $page ) ) {1119 } elseif ( 200 === wp_remote_retrieve_response_code( $page ) ) { 1106 1120 $vhost_ok = true; 1107 1121 } … … 1169 1183 $allowed_themes = array( $stylesheet => true ); 1170 1184 1171 if ( $template != $stylesheet ) {1185 if ( $template !== $stylesheet ) { 1172 1186 $allowed_themes[ $template ] = true; 1173 1187 } 1174 1188 1175 if ( WP_DEFAULT_THEME != $stylesheet && WP_DEFAULT_THEME != $template ) {1189 if ( WP_DEFAULT_THEME !== $stylesheet && WP_DEFAULT_THEME !== $template ) { 1176 1190 $allowed_themes[ WP_DEFAULT_THEME ] = true; 1177 1191 }
Note: See TracChangeset
for help on using the changeset viewer.