Skip to:
Content

BuddyPress.org


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

File:
1 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
Note: See TracChangeset for help on using the changeset viewer.