Ticket #32281: 32281.patch
File 32281.patch, 1.6 KB (added by , 9 years ago) |
---|
-
src/wp-includes/user.php
1191 1191 continue; 1192 1192 1193 1193 $blog_id = (int) $blog_id; 1194 $blog = get_blog_details( $blog_id );1194 $blog = get_blog_details( $blog_id ); 1195 1195 if ( $blog && isset( $blog->domain ) && ( $all || ( ! $blog->archived && ! $blog->spam && ! $blog->deleted ) ) ) { 1196 1196 $blogs[ $blog_id ] = (object) array( 1197 1197 'userblog_id' => $blog_id, … … 1200 1200 'path' => $blog->path, 1201 1201 'site_id' => $blog->site_id, 1202 1202 'siteurl' => $blog->siteurl, 1203 'archived' => 0,1204 'spam' => 0,1205 'deleted' => 01203 'archived' => $blog->archived, 1204 'spam' => $blog->spam, 1205 'deleted' => $blog->deleted, 1206 1206 ); 1207 1207 } 1208 1208 } -
tests/phpunit/tests/user/multisite.php
94 94 $blog_ids_of_user = array_keys( get_blogs_of_user( $user1_id, true ) ); 95 95 $this->assertEquals( $blog_ids, $blog_ids_of_user ); 96 96 97 // Check if these sites have the expected data 98 $blogs_of_user = get_blogs_of_user( $user1_id, true ); 99 $this->assertEquals( 1, $blogs_of_user[ $blog_ids[0] ]->spam ); 100 $this->assertEquals( 1, $blogs_of_user[ $blog_ids[1] ]->archived ); 101 $this->assertEquals( 1, $blogs_of_user[ $blog_ids[2] ]->deleted ); 102 97 103 unset( $blog_ids[0] ); 98 104 unset( $blog_ids[1] ); 99 105 unset( $blog_ids[2] );