Skip to content

Commit 469948e

Browse files
Coding Standards: Move $wp_db_version declaration to the top of wp-admin/network/upgrade.php.
Includes removing a duplicate DocBlock. Follow-up to [12603], [25191], [60095]. See #63168. git-svn-id: https://develop.svn.wordpress.org/trunk@60103 602fd350-edb4-49c9-b593-d223f7449a82
1 parent 4d53bee commit 469948e

File tree

1 file changed

+6
-8
lines changed

1 file changed

+6
-8
lines changed

src/wp-admin/network/upgrade.php

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,11 @@
1212

1313
require_once ABSPATH . WPINC . '/http.php';
1414

15+
/**
16+
* @global int $wp_db_version WordPress database version.
17+
*/
18+
global $wp_db_version;
19+
1520
// Used in the HTML title tag.
1621
$title = __( 'Upgrade Network' );
1722
$parent_file = 'upgrade.php';
@@ -49,10 +54,6 @@
4954
$n = ( isset( $_GET['n'] ) ) ? (int) $_GET['n'] : 0;
5055

5156
if ( $n < 5 ) {
52-
/**
53-
* @global int $wp_db_version WordPress database version.
54-
*/
55-
global $wp_db_version;
5657
update_site_option( 'wpmu_upgrade_site', $wp_db_version );
5758
}
5859

@@ -135,10 +136,7 @@ function nextpage() {
135136
break;
136137
case 'show':
137138
default:
138-
/**
139-
* @global int $wp_db_version WordPress database version.
140-
*/
141-
if ( (int) get_site_option( 'wpmu_upgrade_site' ) !== $GLOBALS['wp_db_version'] ) :
139+
if ( (int) get_site_option( 'wpmu_upgrade_site' ) !== $wp_db_version ) :
142140
?>
143141
<h2><?php _e( 'Database Update Required' ); ?></h2>
144142
<p><?php _e( 'WordPress has been updated! Next and final step is to individually upgrade the sites in your network.' ); ?></p>

0 commit comments

Comments
 (0)