Changeset 22108
- Timestamp:
- 10/04/2012 12:40:09 PM (12 years ago)
- Location:
- trunk
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/includes/class-wp-importer.php
r17771 r22108 133 133 } 134 134 $blog_id = (int) $blog->blog_id; 135 // Restore global $current_blog136 global $current_blog;137 $current_blog = $blog;138 135 } 139 136 … … 213 210 */ 214 211 function is_user_over_quota() { 215 global $current_blog;216 217 212 if ( function_exists( 'upload_is_user_over_quota' ) ) { 218 213 if ( upload_is_user_over_quota( 1 ) ) { -
trunk/wp-admin/ms-delete-site.php
r19712 r22108 25 25 } 26 26 } 27 28 $blog = get_blog_details(); 27 29 28 30 $title = __( 'Delete Site' ); … … 73 75 <?php wp_nonce_field( 'delete-blog' ) ?> 74 76 <input type="hidden" name="action" value="deleteblog" /> 75 <p><input id="confirmdelete" type="checkbox" name="confirmdelete" value="1" /> <label for="confirmdelete"><strong><?php printf( __( "I'm sure I want to permanently disable my site, and I am aware I can never get it back or use %s again." ), is_subdomain_install() ? $ current_blog->domain : $current_blog->domain . $current_blog->path ); ?></strong></label></p>77 <p><input id="confirmdelete" type="checkbox" name="confirmdelete" value="1" /> <label for="confirmdelete"><strong><?php printf( __( "I'm sure I want to permanently disable my site, and I am aware I can never get it back or use %s again." ), is_subdomain_install() ? $blog->domain : $blog->domain . $blog->path ); ?></strong></label></p> 76 78 <?php submit_button( __( 'Delete My Site Permanently' ) ); ?> 77 79 </form> -
trunk/wp-includes/class-wp-xmlrpc-server.php
r22037 r22108 3661 3661 */ 3662 3662 function _multisite_getUsersBlogs($args) { 3663 global $current_blog; 3663 $current_blog = get_blog_details(); 3664 3664 3665 $domain = $current_blog->domain; 3665 3666 $path = $current_blog->path . 'xmlrpc.php'; -
trunk/wp-includes/functions.php
r22106 r22108 3119 3119 */ 3120 3120 function is_main_site( $blog_id = '' ) { 3121 global $current_site , $current_blog;3122 3123 if ( ! is_multisite() )3121 global $current_site; 3122 3123 if ( ! is_multisite() ) 3124 3124 return true; 3125 3125 3126 if ( ! $blog_id )3127 $blog_id = $current_blog->blog_id;3126 if ( ! $blog_id ) 3127 $blog_id = get_current_blog_id(); 3128 3128 3129 3129 return $blog_id == $current_site->blog_id; -
trunk/wp-includes/ms-blogs.php
r22092 r22108 119 119 * @since MU 120 120 * 121 * @param int|string|array $fields A blog ID, a blog slug, or an array of fields to query against. 121 * @param int|string|array $fields A blog ID, a blog slug, or an array of fields to query against. Optional. If not specified the current blog ID is used. 122 122 * @param bool $get_all Whether to retrieve all details or only the details in the blogs table. Default is true. 123 123 * @return object Blog details. 124 124 */ 125 function get_blog_details( $fields , $get_all = true ) {125 function get_blog_details( $fields = null, $get_all = true ) { 126 126 global $wpdb; 127 127 … … 167 167 } 168 168 } else { 169 if ( !is_numeric( $fields ) ) 169 if ( ! $fields ) 170 $blog_id = get_current_blog_id(); 171 elseif ( ! is_numeric( $fields ) ) 170 172 $blog_id = get_id_from_blogname( $fields ); 171 173 else -
trunk/wp-includes/ms-load.php
r19760 r22108 70 70 */ 71 71 function ms_site_check() { 72 global $wpdb, $current_blog; 72 global $wpdb; 73 74 $blog = get_blog_details(); 73 75 74 76 // Allow short-circuiting … … 81 83 return true; 82 84 83 if ( '1' == $ current_blog->deleted ) {85 if ( '1' == $blog->deleted ) { 84 86 if ( file_exists( WP_CONTENT_DIR . '/blog-deleted.php' ) ) 85 87 return WP_CONTENT_DIR . '/blog-deleted.php'; … … 88 90 } 89 91 90 if ( '2' == $ current_blog->deleted ) {92 if ( '2' == $blog->deleted ) { 91 93 if ( file_exists( WP_CONTENT_DIR . '/blog-inactive.php' ) ) 92 94 return WP_CONTENT_DIR . '/blog-inactive.php'; … … 95 97 } 96 98 97 if ( $ current_blog->archived == '1' || $current_blog->spam == '1' ) {99 if ( $blog->archived == '1' || $blog->spam == '1' ) { 98 100 if ( file_exists( WP_CONTENT_DIR . '/blog-suspended.php' ) ) 99 101 return WP_CONTENT_DIR . '/blog-suspended.php';
Note: See TracChangeset
for help on using the changeset viewer.