- Timestamp:
- 09/24/2018 03:22:01 PM (6 years ago)
- Location:
- trunk
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/phpcs.xml.dist
r43641 r43655 84 84 <rule ref="WordPress.DB.PreparedSQL.NotPrepared"> 85 85 <exclude-pattern>/tests/phpunit/tests/admin/includesSchema\.php</exclude-pattern> 86 <exclude-pattern>/tests/phpunit/tests/multisite/site\.php</exclude-pattern> 86 87 </rule> 87 88 -
trunk/src/wp-includes/ms-blogs.php
r43654 r43655 59 59 function get_blogaddress_by_name( $blogname ) { 60 60 if ( is_subdomain_install() ) { 61 if ( $blogname == 'main') {61 if ( 'main' === $blogname ) { 62 62 $blogname = 'www'; 63 63 } … … 179 179 $blog_id = (int) $blog_id; 180 180 181 $all = $get_all == true? '' : 'short';181 $all = $get_all ? '' : 'short'; 182 182 $details = wp_cache_get( $blog_id . $all, 'blog-details' ); 183 183 184 184 if ( $details ) { 185 185 if ( ! is_object( $details ) ) { 186 if ( $details == -1) {186 if ( -1 == $details ) { 187 187 return false; 188 188 } else { … … 204 204 if ( $details ) { 205 205 if ( ! is_object( $details ) ) { 206 if ( $details == -1) {206 if ( -1 == $details ) { 207 207 return false; 208 208 } else { … … 1176 1176 } 1177 1177 1178 $users = get_users( array( 1179 'blog_id' => $site->id, 1180 'fields' => 'ids', 1181 ) ); 1178 $users = get_users( 1179 array( 1180 'blog_id' => $site->id, 1181 'fields' => 'ids', 1182 ) 1183 ); 1182 1184 1183 1185 // Remove users from the site. … … 1230 1232 $dir = $stack[ $index ]; 1231 1233 1232 // phpcs:disable Generic.PHP.NoSilencedErrors.Discouraged1234 // phpcs:disable WordPress.PHP.NoSilencedErrors.Discouraged 1233 1235 $dh = @opendir( $dir ); 1234 1236 if ( $dh ) { … … 1260 1262 } 1261 1263 1262 // phpcs:enable Generic.PHP.NoSilencedErrors.Discouraged1264 // phpcs:enable WordPress.PHP.NoSilencedErrors.Discouraged 1263 1265 if ( $switch ) { 1264 1266 restore_current_blog(); -
trunk/tests/phpunit/tests/multisite/site.php
r43654 r43655 61 61 62 62 remove_action( 'wp_initialize_site', 'wp_initialize_site', 10 ); 63 self::$uninitialized_site_id = wp_insert_site( array( 64 'domain' => 'uninitialized.org', 65 'path' => '/', 66 'site_id' => self::$network_ids['make.wordpress.org/'], 67 ) ); 63 self::$uninitialized_site_id = wp_insert_site( 64 array( 65 'domain' => 'uninitialized.org', 66 'path' => '/', 67 'site_id' => self::$network_ids['make.wordpress.org/'], 68 ) 69 ); 68 70 add_action( 'wp_initialize_site', 'wp_initialize_site', 10, 2 ); 69 71 } … … 2307 2309 ) 2308 2310 ); 2309 $passed_args = $this->wp_initialize_site_args; 2310 2311 2312 $passed_args = $this->wp_initialize_site_args; 2311 2313 $this->wp_initialize_site_args = null; 2312 2314
Note: See TracChangeset
for help on using the changeset viewer.