Skip to content

Commit

Permalink
Multisite: Fix coding standard errors after [43654].
Browse files Browse the repository at this point in the history
See #41333.

Built from https://develop.svn.wordpress.org/trunk@43655


git-svn-id: http://core.svn.wordpress.org/trunk@43484 1a063a9b-81f0-0310-95a4-ce76da25c4cd
  • Loading branch information
Felix Arntz committed Sep 24, 2018
1 parent 2b10923 commit a58654d
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 11 deletions.
22 changes: 12 additions & 10 deletions wp-includes/ms-blogs.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ function get_blogaddress_by_id( $blog_id ) {
*/
function get_blogaddress_by_name( $blogname ) {
if ( is_subdomain_install() ) {
if ( $blogname == 'main' ) {
if ( 'main' === $blogname ) {
$blogname = 'www';
}
$url = rtrim( network_home_url(), '/' );
Expand Down Expand Up @@ -178,12 +178,12 @@ function get_blog_details( $fields = null, $get_all = true ) {

$blog_id = (int) $blog_id;

$all = $get_all == true ? '' : 'short';
$all = $get_all ? '' : 'short';
$details = wp_cache_get( $blog_id . $all, 'blog-details' );

if ( $details ) {
if ( ! is_object( $details ) ) {
if ( $details == -1 ) {
if ( -1 == $details ) {
return false;
} else {
// Clear old pre-serialized objects. Cache clients do better with that.
Expand All @@ -203,7 +203,7 @@ function get_blog_details( $fields = null, $get_all = true ) {
// If short was requested and full cache is set, we can return.
if ( $details ) {
if ( ! is_object( $details ) ) {
if ( $details == -1 ) {
if ( -1 == $details ) {
return false;
} else {
// Clear old pre-serialized objects. Cache clients do better with that.
Expand Down Expand Up @@ -1175,10 +1175,12 @@ function wp_uninitialize_site( $site_id ) {
return new WP_Error( 'site_already_uninitialized', __( 'The site appears to be already uninitialized.' ) );
}

$users = get_users( array(
'blog_id' => $site->id,
'fields' => 'ids',
) );
$users = get_users(
array(
'blog_id' => $site->id,
'fields' => 'ids',
)
);

// Remove users from the site.
if ( ! empty( $users ) ) {
Expand Down Expand Up @@ -1229,7 +1231,7 @@ function wp_uninitialize_site( $site_id ) {
// Get indexed directory from stack
$dir = $stack[ $index ];

// phpcs:disable Generic.PHP.NoSilencedErrors.Discouraged
// phpcs:disable WordPress.PHP.NoSilencedErrors.Discouraged
$dh = @opendir( $dir );
if ( $dh ) {
$file = @readdir( $dh );
Expand Down Expand Up @@ -1259,7 +1261,7 @@ function wp_uninitialize_site( $site_id ) {
}
}

// phpcs:enable Generic.PHP.NoSilencedErrors.Discouraged
// phpcs:enable WordPress.PHP.NoSilencedErrors.Discouraged
if ( $switch ) {
restore_current_blog();
}
Expand Down
2 changes: 1 addition & 1 deletion wp-includes/version.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
*
* @global string $wp_version
*/
$wp_version = '5.0-alpha-43654';
$wp_version = '5.0-alpha-43655';

/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
Expand Down

0 comments on commit a58654d

Please sign in to comment.