Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
11/15/2015 06:56:24 PM (11 years ago)
Author:
tw2113
Message:

More documentation cleanup for part of BP-Core component.

See #6398.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-core/admin/bp-core-admin-schema.php

    r10108 r10354  
    1616 *
    1717 * @global $wpdb $wpdb
     18 *
    1819 * @return string The default database character-set, if set.
    1920 */
    … …  
    4041        bp_pre_schema_upgrade();
    4142
    42         // If no components passed, get all the active components from the main site
     43        // If no components passed, get all the active components from the main site.
    4344        if ( empty( $active_components ) ) {
    4445
    … …  
    4748        }
    4849
    49         // Install Activity Streams even when inactive (to store last_activity data)
     50        // Install Activity Streams even when inactive (to store last_activity data).
    5051        bp_core_install_activity_streams();
    5152
    52         // Install the signups table
     53        // Install the signups table.
    5354        bp_core_maybe_install_signups();
    5455
    55         // Notifications
     56        // Notifications.
    5657        if ( !empty( $active_components['notifications'] ) ) {
    5758                bp_core_install_notifications();
    5859        }
    5960
    60         // Friend Connections
     61        // Friend Connections.
    6162        if ( !empty( $active_components['friends'] ) ) {
    6263                bp_core_install_friends();
    6364        }
    6465
    65         // Extensible Groups
     66        // Extensible Groups.
    6667        if ( !empty( $active_components['groups'] ) ) {
    6768                bp_core_install_groups();
    6869        }
    6970
    70         // Private Messaging
     71        // Private Messaging.
    7172        if ( !empty( $active_components['messages'] ) ) {
    7273                bp_core_install_private_messaging();
    7374        }
    7475
    75         // Extended Profiles
     76        // Extended Profiles.
    7677        if ( !empty( $active_components['xprofile'] ) ) {
    7778                bp_core_install_extended_profiles();
    7879        }
    7980
    80         // Blog tracking
     81        // Blog tracking.
    8182        if ( !empty( $active_components['blogs'] ) ) {
    8283                bp_core_install_blog_tracking();
    … …  
    345346        $bp_prefix       = bp_core_get_table_prefix();
    346347
    347         // These values should only be updated if they are not already present
     348        // These values should only be updated if they are not already present.
    348349        if ( ! bp_get_option( 'bp-xprofile-base-group-name' ) ) {
    349350                bp_update_option( 'bp-xprofile-base-group-name', _x( 'General', 'First field-group name', 'buddypress' ) );
    … …  
    405406        dbDelta( $sql );
    406407
    407         // Insert the default group and fields
     408        // Insert the default group and fields.
    408409        $insert_sql = array();
    409410
    … …  
    466467        global $wpdb;
    467468
    468         // Signups is not there and we need it so let's create it
     469        // Signups is not there and we need it so let's create it.
    469470        require_once( buddypress()->plugin_dir . '/bp-core/admin/bp-core-admin-schema.php' );
    470471        require_once( ABSPATH                  . 'wp-admin/includes/upgrade.php'     );
    471472
    472         // Never use bp_core_get_table_prefix() for any global users tables
     473        // Never use bp_core_get_table_prefix() for any global users tables.
    473474        $wpdb->signups = $wpdb->base_prefix . 'signups';
    474475
    475         // Use WP's core CREATE TABLE query
     476        // Use WP's core CREATE TABLE query.
    476477        $create_queries = wp_get_db_schema( 'ms_global' );
    477478        if ( ! is_array( $create_queries ) ) {
    … …  
    480481        }
    481482
    482         // Filter out all the queries except wp_signups
     483        // Filter out all the queries except wp_signups.
    483484        foreach ( $create_queries as $key => $query ) {
    484485                if ( preg_match( "|CREATE TABLE ([^ ]*)|", $query, $matches ) ) {
    … …  
    489490        }
    490491
    491         // Run WordPress's database upgrader
     492        // Run WordPress's database upgrader.
    492493        if ( ! empty( $create_queries ) ) {
    493494                dbDelta( $create_queries );
    … …  
    513514        global $wpdb;
    514515
    515         // Bail if global tables should not be upgraded
     516        // Bail if global tables should not be upgraded.
    516517        if ( defined( 'DO_NOT_UPGRADE_GLOBAL_TABLES' ) ) {
    517518                return;
    518519        }
    519520
    520         // Never use bp_core_get_table_prefix() for any global users tables
     521        // Never use bp_core_get_table_prefix() for any global users tables.
    521522        $wpdb->signups = $wpdb->base_prefix . 'signups';
    522523
    523         // Attempt to alter the signups table
     524        // Attempt to alter the signups table.
    524525        $wpdb->query( "ALTER TABLE {$wpdb->signups} ADD signup_id BIGINT(20) NOT NULL AUTO_INCREMENT PRIMARY KEY FIRST" );
    525526        $wpdb->query( "ALTER TABLE {$wpdb->signups} DROP INDEX domain" );
Note: See TracChangeset for help on using the changeset viewer.