Skip to:
Content

BuddyPress.org

Changeset 10902


Ignore:
Timestamp:
06/23/2016 03:03:04 PM (8 years ago)
Author:
djpaul
Message:

Explicitly set database collation type when installing BuddyPress.

Fixes #7117, props kitsunesolar

Location:
trunk/src
Files:
1 added
3 edited

Legend:

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

    r10825 r10902  
    1212
    1313/**
    14  * Get the DB schema to use for BuddyPress components.
    15  *
    16  * @since 1.1.0
    17  *
    18  * @global $wpdb $wpdb
    19  *
    20  * @return string The default database character-set, if set.
    21  */
    22 function bp_core_set_charset() {
    23     global $wpdb;
    24 
    25     require_once( ABSPATH . 'wp-admin/includes/upgrade.php' );
    26 
    27     return !empty( $wpdb->charset ) ? "DEFAULT CHARACTER SET {$wpdb->charset}" : '';
    28 }
    29 
    30 /**
    3114 * Main installer.
    3215 *
     
    9477function bp_core_install_notifications() {
    9578    $sql             = array();
    96     $charset_collate = bp_core_set_charset();
     79    $charset_collate = $GLOBALS['wpdb']->get_charset_collate();
    9780    $bp_prefix       = bp_core_get_table_prefix();
    9881
     
    135118function bp_core_install_activity_streams() {
    136119    $sql             = array();
    137     $charset_collate = bp_core_set_charset();
     120    $charset_collate = $GLOBALS['wpdb']->get_charset_collate();
    138121    $bp_prefix       = bp_core_get_table_prefix();
    139122
     
    185168function bp_core_install_friends() {
    186169    $sql             = array();
    187     $charset_collate = bp_core_set_charset();
     170    $charset_collate = $GLOBALS['wpdb']->get_charset_collate();
    188171    $bp_prefix       = bp_core_get_table_prefix();
    189172
     
    210193function bp_core_install_groups() {
    211194    $sql             = array();
    212     $charset_collate = bp_core_set_charset();
     195    $charset_collate = $GLOBALS['wpdb']->get_charset_collate();
    213196    $bp_prefix       = bp_core_get_table_prefix();
    214197
     
    267250function bp_core_install_private_messaging() {
    268251    $sql             = array();
    269     $charset_collate = bp_core_set_charset();
     252    $charset_collate = $GLOBALS['wpdb']->get_charset_collate();
    270253    $bp_prefix       = bp_core_get_table_prefix();
    271254
     
    326309
    327310    $sql             = array();
    328     $charset_collate = bp_core_set_charset();
     311    $charset_collate = $GLOBALS['wpdb']->get_charset_collate();
    329312    $bp_prefix       = bp_core_get_table_prefix();
    330313
     
    411394function bp_core_install_blog_tracking() {
    412395    $sql             = array();
    413     $charset_collate = bp_core_set_charset();
     396    $charset_collate = $GLOBALS['wpdb']->get_charset_collate();
    414397    $bp_prefix       = bp_core_get_table_prefix();
    415398
  • trunk/src/bp-core/bp-core-update.php

    r10899 r10902  
    192192    ) );
    193193
     194    require_once( ABSPATH . 'wp-admin/includes/upgrade.php' );
    194195    require_once( buddypress()->plugin_dir . '/bp-core/admin/bp-core-admin-schema.php' );
    195196    $switched_to_root_blog = false;
  • trunk/src/bp-loader.php

    r10901 r10902  
    523523            require( $this->plugin_dir . 'bp-core/deprecated/2.5.php' );
    524524            require( $this->plugin_dir . 'bp-core/deprecated/2.6.php' );
     525            require( $this->plugin_dir . 'bp-core/deprecated/2.7.php' );
    525526        }
    526527    }
Note: See TracChangeset for help on using the changeset viewer.