Changeset 4965
- Timestamp:
- 08/11/2011 08:44:20 PM (14 years ago)
- Location:
- trunk
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-blogs/bp-blogs-functions.php
r4961 r4965 50 50 $wpdb->query( "TRUNCATE TABLE {$bp->blogs->table_name}" ); 51 51 52 $blog_ids = $wpdb->get_col( $wpdb->prepare( "SELECT blog_id FROM {$wpdb->base_prefix}blogs WHERE mature = 0 AND spam = 0 AND deleted = 0" ) ); 52 if ( is_multisite() ) 53 $blog_ids = $wpdb->get_col( $wpdb->prepare( "SELECT blog_id FROM {$wpdb->base_prefix}blogs WHERE mature = 0 AND spam = 0 AND deleted = 0" ) ); 54 else 55 $blog_ids = 1; 53 56 54 57 if ( $blog_ids ) { … … 57 60 $subscribers = get_users( array( 'blog_id' => $blog_id, 'role' => 'subscriber' ) ); 58 61 59 if ( $users) {62 if ( !empty( $users ) ) { 60 63 foreach ( (array)$users as $user ) { 61 64 // Don't record blogs for subscribers … … 461 464 global $wpdb, $bp; 462 465 463 if ( !is_numeric( $blog_id ) || !is_multisite())466 if ( !is_numeric( $blog_id ) ) 464 467 return false; 465 468 … … 488 491 $blog_id = (int) $blog_id; 489 492 490 if ( !$blog_id || !is_multisite())493 if ( !$blog_id ) 491 494 return false; 492 495 … … 520 523 global $wpdb, $bp; 521 524 522 if ( !is_numeric( $blog_id ) || !is_multisite())525 if ( !is_numeric( $blog_id ) ) 523 526 return false; 524 527 -
trunk/bp-blogs/bp-blogs-loader.php
r4961 r4965 54 54 'slug' => BP_BLOGS_SLUG, 55 55 'root_slug' => isset( $bp->pages->blogs->slug ) ? $bp->pages->blogs->slug : BP_BLOGS_SLUG, 56 'has_directory' => true,56 'has_directory' => is_multisite(), // Non-multisite installs don't need a top-level Sites directory, since there's only one site 57 57 'notification_callback' => 'bp_blogs_format_notifications', 58 58 'search_string' => __( 'Search sites...', 'buddypress' ), -
trunk/bp-core/admin/bp-core-admin.php
r4963 r4965 12 12 } 13 13 add_action( 'in_plugin_update_message-buddypress/bp-loader.php', 'bp_core_update_message' ); 14 15 /**16 * Renders the main admin panel.17 *18 * @package BuddyPress Core19 * @since {@internal Unknown}}20 */21 function bp_core_admin_dashboard() {22 $base_url = bp_get_admin_url( 'admin.php' );23 $action = add_query_arg( array( 'page' => 'bp-general-settings' ), $base_url );24 ?>25 26 <div class="wrap" id="bp-admin">27 28 <div id="bp-admin-header">29 <h3><?php _e( 'BuddyPress', 'buddypress' ); ?></h3>30 <h2><?php _e( 'Dashboard', 'buddypress' ); ?></h2>31 </div>32 33 <?php do_action( 'bp_admin_notices' ); ?>34 35 <form action="<?php echo $action ?>" method="post" id="bp-admin-form">36 <div id="bp-admin-content">37 <p>[TODO: All sorts of awesome things will go here. Latest plugins and themes, stats, version check, support topics, news, tips]</p>38 </div>39 </form>40 41 </div>42 43 <?php44 }45 14 46 15 /** … … 348 317 'description' => __( 'Allow your users to modify their account and notification settings directly from within their profiles.', 'buddypress' ) 349 318 ), 350 'friends' => array(319 'friends' => array( 351 320 'title' => __( 'Friend Connections', 'buddypress' ), 352 321 'description' => __( 'Let your users make connections so they can track the activity of others and focus on the people they care about the most.', 'buddypress' ) … … 360 329 'description' => __( 'Global, personal, and group activity streams with threaded commenting, direct posting, favoriting and @mentions, all with full RSS feed and email notification support.', 'buddypress' ) 361 330 ), 362 'groups' => array(331 'groups' => array( 363 332 'title' => __( 'User Groups', 'buddypress' ), 364 333 'description' => __( 'Groups allow your users to organize themselves into specific public, private or hidden sections with separate activity streams and member listings.', 'buddypress' ) 365 334 ), 366 'forums' => array(335 'forums' => array( 367 336 'title' => __( 'Discussion Forums', 'buddypress' ), 368 337 'description' => __( 'Full-powered discussion forums built directly into groups allow for more conventional in-depth conversations. NOTE: This will require an extra (but easy) setup step.', 'buddypress' ) 338 ), 339 'blogs' => array( 340 'title' => __( 'Site Tracking', 'buddypress' ), 341 'description' => __( 'Make BuddyPress aware of new posts and new comments from your site.', 'buddypress' ) 369 342 ) 370 343 ) ); 371 344 372 if ( is_multisite() ) { 373 $optional_components['blogs'] = array( 374 'title' => __( 'Site Tracking', 'buddypress' ), 375 'description' => __( 'Track new sites, new posts and new comments across your entire network.', 'buddypress' ) 376 ); 377 } 345 if ( is_multisite() ) 346 $optional_components['blogs']['description'] = __( 'Make BuddyPress aware of new sites, new posts and new comments from across your entire network.', 'buddypress' ); 378 347 379 348 // Required components -
trunk/bp-core/admin/bp-core-update.php
r4961 r4965 302 302 <th scope="row"> 303 303 <h5><?php _e( 'Sites', 'buddypress' ); ?></h5> 304 <p><?php _e( 'Displays individual groups as well as a directory of groups.', 'buddypress' ); ?></p>304 <p><?php _e( 'Displays a directory of the sites in your network.', 'buddypress' ); ?></p> 305 305 </th> 306 306 <td> … … 312 312 </table> 313 313 314 <p><?php _e( 'Would you like to enable site tracking, which tracks activity across all ofyour network?', 'buddypress' ); ?></p>314 <p><?php _e( 'Would you like to enable site tracking, which tracks blog posts and comments from across your network?', 'buddypress' ); ?></p> 315 315 316 316 <div class="left-col"> … … 428 428 <tr valign="top"> 429 429 <th scope="row"> 430 <h5><?php _e( 'Members', 'buddypres ' ); ?></h5>430 <h5><?php _e( 'Members', 'buddypress' ); ?></h5> 431 431 <p><?php _e( 'Displays member profiles, and a directory of all site members.', 'buddypress' ); ?></p> 432 432 </th> … … 472 472 <th scope="row"> 473 473 <h5><?php _e( 'Forums', 'buddypress' ); ?></h5> 474 <p><?php _e( 'Displays individual groups as well as a directory of groups.', 'buddypress' ); ?></p>474 <p><?php _e( 'Displays a directory of public forum topics.', 'buddypress' ); ?></p> 475 475 </th> 476 476 <td> … … 482 482 <?php endif; ?> 483 483 484 <?php /* The Blogs component only needs a directory page when Multisite is enabled */ ?> 484 485 <?php if ( is_multisite() && isset( $active_components['blogs'] ) ) : ?> 485 486 … … 487 488 <th scope="row"> 488 489 <h5><?php _e( 'Sites', 'buddypress' ); ?></h5> 489 <p><?php _e( 'Displays individual groups as well as a directory of groups.', 'buddypress' ); ?></p>490 <p><?php _e( 'Displays a directory of the sites in your network.', 'buddypress' ); ?></p> 490 491 </th> 491 492 <td> … … 1023 1024 if ( !function_exists( 'bp_core_update_message' ) ) 1024 1025 require( WP_PLUGIN_DIR . '/buddypress/bp-core/admin/bp-core-admin.php' ); 1026 1025 1027 bp_core_add_admin_menu(); 1026 1028 … … 1110 1112 bp_core_install_extended_profiles(); 1111 1113 1112 // Only install blog tables if this is a multisite installation1113 if ( is_multisite() &&!empty( $active_components['blogs'] ) )1114 // Blog tracking 1115 if ( !empty( $active_components['blogs'] ) ) 1114 1116 bp_core_install_blog_tracking(); 1115 1117 } … … 1137 1139 1138 1140 // On first installation - record all existing blogs in the system. 1139 if ( !(int)$bp->site_options['bp-blogs-first-install'] && is_multisite()) {1141 if ( !(int)$bp->site_options['bp-blogs-first-install'] ) { 1140 1142 bp_blogs_record_existing_blogs(); 1141 1143 bp_update_option( 'bp-blogs-first-install', 1 ); -
trunk/bp-core/bp-core-functions.php
r4961 r4965 353 353 * on the off chance that someone has activated the blogs component and then disabled MS 354 354 */ 355 if ( is_multisite() &&bp_is_active( 'blogs' ) ) {355 if ( bp_is_active( 'blogs' ) ) { 356 356 $count = $wpdb->get_var( $wpdb->prepare( "SELECT COUNT(*) FROM {$bp->blogs->table_name}" ) ); 357 357 -
trunk/bp-core/bp-core-loader.php
r4961 r4965 58 58 59 59 // Set the included and optional components. 60 $bp->optional_components = array( 'activity', 'forums', 'friends', 'groups', 'messages', 'settings', 'xprofile' ); 61 62 // Blogs component only available for multisite 63 if ( is_multisite() ) 64 $bp->optional_components[] = 'blogs'; 65 66 $bp->optional_components = apply_filters( 'bp_optional_components', $bp->optional_components ); 60 $bp->optional_components = apply_filters( 'bp_optional_components', array( 'activity', 'blogs', 'forums', 'friends', 'groups', 'messages', 'settings', 'xprofile' ) ); 67 61 68 62 // Set the required components 69 $bp->required_components 63 $bp->required_components = apply_filters( 'bp_required_components', array( 'members' ) ); 70 64 71 65 // Get a list of activated components
Note: See TracChangeset
for help on using the changeset viewer.