Ticket #22090: 22090.diff
File 22090.diff, 5.7 KB (added by , 12 years ago) |
---|
-
wp-includes/functions.php
3121 3121 * @return bool True if not multisite or $blog_id is main site 3122 3122 */ 3123 3123 function is_main_site( $blog_id = '' ) { 3124 global $current_site , $current_blog;3124 global $current_site; 3125 3125 3126 if ( ! is_multisite() )3126 if ( ! is_multisite() ) 3127 3127 return true; 3128 3128 3129 if ( ! $blog_id )3130 $blog_id = $current_blog->blog_id;3129 if ( ! $blog_id ) 3130 $blog_id = get_current_blog_id(); 3131 3131 3132 3132 return $blog_id == $current_site->blog_id; 3133 3133 } -
wp-includes/ms-blogs.php
118 118 * 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 128 128 if ( is_array($fields ) ) { … … 166 166 return false; 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 172 174 $blog_id = $fields; -
wp-includes/class-wp-xmlrpc-server.php
3660 3660 * @access protected 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'; 3666 3667 -
wp-includes/ms-load.php
69 69 * @return bool|string Returns true on success, or drop-in file to include. 70 70 */ 71 71 function ms_site_check() { 72 global $wpdb , $current_blog;72 global $wpdb; 73 73 74 $blog = get_blog_details(); 75 74 76 // Allow short-circuiting 75 77 $check = apply_filters('ms_site_check', null); 76 78 if ( null !== $check ) … … 80 82 if ( is_super_admin() ) 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'; 86 88 else 87 89 wp_die( __( 'This user has elected to delete their account and the content is no longer available.' ), '', array( 'response' => 410 ) ); 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'; 93 95 else 94 96 wp_die( sprintf( __( 'This site has not been activated yet. If you are having problems activating your site, please contact <a href="mailto:%1$s">%1$s</a>.' ), str_replace( '@', ' AT ', get_site_option( 'admin_email', "support@{$current_site->domain}" ) ) ) ); 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'; 100 102 else -
wp-admin/includes/class-wp-importer.php
132 132 exit(); 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 140 137 if ( function_exists( 'is_multisite' ) ) { … … 212 209 * @return bool 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 ) ) { 219 214 echo "Sorry, you have used your upload quota.\n"; -
wp-admin/ms-delete-site.php
25 25 } 26 26 } 27 27 28 $blog = get_blog_details(); 29 28 30 $title = __( 'Delete Site' ); 29 31 $parent_file = 'tools.php'; 30 32 require_once( './admin-header.php' ); … … 72 74 <form method="post" name="deletedirect"> 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> 78 80 <?php