diff --git a/wp-includes/ms-blogs.php b/wp-includes/ms-blogs.php index a6f2f2de1d..80462f300c 100644 --- a/wp-includes/ms-blogs.php +++ b/wp-includes/ms-blogs.php @@ -539,39 +539,4 @@ function get_last_updated( $deprecated = '', $start = 0, $quantity = 40 ) { return $wpdb->get_results( $wpdb->prepare("SELECT blog_id, domain, path FROM $wpdb->blogs WHERE site_id = %d AND public = '1' AND archived = '0' AND mature = '0' AND spam = '0' AND deleted = '0' AND last_updated != '0000-00-00 00:00:00' ORDER BY last_updated DESC limit %d, %d", $wpdb->siteid, $start, $quantity ) , ARRAY_A ); } -function get_blog_list( $start = 0, $num = 10, $deprecated = '' ) { - global $wpdb; - - $blogs = get_site_option( "blog_list" ); - $update = false; - if ( is_array( $blogs ) ) { - if ( ( $blogs['time'] + 60 ) < time() ) { // cache for 60 seconds. - $update = true; - } - } else { - $update = true; - } - - if ( $update == true ) { - unset( $blogs ); - $blogs = $wpdb->get_results( $wpdb->prepare("SELECT blog_id, domain, path FROM $wpdb->blogs WHERE site_id = %d AND public = '1' AND archived = '0' AND mature = '0' AND spam = '0' AND deleted = '0' ORDER BY registered DESC", $wpdb->siteid), ARRAY_A ); - - foreach ( (array) $blogs as $details ) { - $blog_list[ $details['blog_id'] ] = $details; - $blog_list[ $details['blog_id'] ]['postcount'] = $wpdb->get_var( "SELECT COUNT(ID) FROM " . $wpdb->base_prefix . $details['blog_id'] . "_posts WHERE post_status='publish' AND post_type='post'" ); - } - unset( $blogs ); - $blogs = $blog_list; - update_site_option( "blog_list", $blogs ); - } - - if ( false == is_array( $blogs ) ) - return array(); - - if ( $num == 'all' ) - return array_slice( $blogs, $start, count( $blogs ) ); - else - return array_slice( $blogs, $start, $num ); -} - ?> diff --git a/wp-includes/ms-deprecated.php b/wp-includes/ms-deprecated.php index d99ae9b1de..291362945a 100644 --- a/wp-includes/ms-deprecated.php +++ b/wp-includes/ms-deprecated.php @@ -148,4 +148,21 @@ function validate_email( $email, $check_domain = true) { return is_email( $email, $check_domain ); } +/** + * @since MU + * @deprecated 3.0.0 + */ +function get_blog_list( $start = 0, $num = 10, $deprecated = '' ) { + _deprecated_function( __FUNCTION__, '3.0' ); + return 0; +} + +/** + * @since MU + * @deprecated 3.0.0 + */ +function get_most_active_blogs( $num = 10, $display = true ) { + _deprecated_function( __FUNCTION__, '3.0' ); + return 0; +} ?> diff --git a/wp-includes/ms-functions.php b/wp-includes/ms-functions.php index 2ca7e4ea85..738d5aa6cd 100644 --- a/wp-includes/ms-functions.php +++ b/wp-includes/ms-functions.php @@ -158,49 +158,6 @@ function is_user_member_of_blog( $user_id, $blog_id = 0 ) { return false; } -function get_most_active_blogs( $num = 10, $display = true ) { - $most_active = get_site_option( 'most_active' ); - $update = false; - if ( is_array( $most_active ) ) { - if ( ( $most_active['time'] + 60 ) < time() ) { // cache for 60 seconds. - $update = true; - } - } else { - $update = true; - } - - if ( $update == true ) { - unset( $most_active ); - $blogs = get_blog_list( 0, 'all', false ); // $blog_id -> $details - if ( is_array( $blogs ) ) { - reset( $blogs ); - foreach ( (array) $blogs as $key => $details ) { - $most_active[ $details['blog_id'] ] = $details['postcount']; - $blog_list[ $details['blog_id'] ] = $details; // array_slice() removes keys!! - } - arsort( $most_active ); - reset( $most_active ); - foreach ( (array) $most_active as $key => $details ) - $t[ $key ] = $blog_list[ $key ]; - - unset( $most_active ); - $most_active = $t; - } - update_site_option( 'most_active', $most_active ); - } - - if ( $display == true ) { - if ( is_array( $most_active ) ) { - reset( $most_active ); - foreach ( (array) $most_active as $key => $details ) { - $url = esc_url('http://' . $details['domain'] . $details['path']); - echo '