Skip to:
Content

BuddyPress.org

Ticket #7147: 7147.patch

File 7147.patch, 3.2 KB (added by imath, 10 years ago)
  • src/bp-core/admin/bp-core-admin-schema.php

    diff --git src/bp-core/admin/bp-core-admin-schema.php src/bp-core/admin/bp-core-admin-schema.php
    index 1867e78..c017b23 100644
     
    1111defined( 'ABSPATH' ) || exit;
    1212
    1313/**
     14 * Get Database collation type and make sure to load
     15 * the file that is containing the dbDelta function.
     16 *
     17 * @since  2.7.0
     18 *
     19 * @return string Database collation type
     20 */
     21function bp_core_get_charset_collate() {
     22        require_once( ABSPATH . 'wp-admin/includes/upgrade.php' );
     23
     24        return $GLOBALS['wpdb']->get_charset_collate();
     25}
     26
     27/**
    1428 * Main installer.
    1529 *
    1630 * Can be passed an optional array of components to explicitly run installation
    function bp_core_install( $active_components = false ) { 
    7690 */
    7791function bp_core_install_notifications() {
    7892        $sql             = array();
    79         $charset_collate = $GLOBALS['wpdb']->get_charset_collate();
     93        $charset_collate = bp_core_get_charset_collate();
    8094        $bp_prefix       = bp_core_get_table_prefix();
    8195
    8296        $sql[] = "CREATE TABLE {$bp_prefix}bp_notifications (
    function bp_core_install_notifications() { 
    117131 */
    118132function bp_core_install_activity_streams() {
    119133        $sql             = array();
    120         $charset_collate = $GLOBALS['wpdb']->get_charset_collate();
     134        $charset_collate = bp_core_get_charset_collate();
    121135        $bp_prefix       = bp_core_get_table_prefix();
    122136
    123137        $sql[] = "CREATE TABLE {$bp_prefix}bp_activity (
    function bp_core_install_activity_streams() { 
    167181 */
    168182function bp_core_install_friends() {
    169183        $sql             = array();
    170         $charset_collate = $GLOBALS['wpdb']->get_charset_collate();
     184        $charset_collate = bp_core_get_charset_collate();
    171185        $bp_prefix       = bp_core_get_table_prefix();
    172186
    173187        $sql[] = "CREATE TABLE {$bp_prefix}bp_friends (
    function bp_core_install_friends() { 
    192206 */
    193207function bp_core_install_groups() {
    194208        $sql             = array();
    195         $charset_collate = $GLOBALS['wpdb']->get_charset_collate();
     209        $charset_collate = bp_core_get_charset_collate();
    196210        $bp_prefix       = bp_core_get_table_prefix();
    197211
    198212        $sql[] = "CREATE TABLE {$bp_prefix}bp_groups (
    function bp_core_install_groups() { 
    249263 */
    250264function bp_core_install_private_messaging() {
    251265        $sql             = array();
    252         $charset_collate = $GLOBALS['wpdb']->get_charset_collate();
     266        $charset_collate = bp_core_get_charset_collate();
    253267        $bp_prefix       = bp_core_get_table_prefix();
    254268
    255269        $sql[] = "CREATE TABLE {$bp_prefix}bp_messages_messages (
    function bp_core_install_extended_profiles() { 
    308322        global $wpdb;
    309323
    310324        $sql             = array();
    311         $charset_collate = $GLOBALS['wpdb']->get_charset_collate();
     325        $charset_collate = bp_core_get_charset_collate();
    312326        $bp_prefix       = bp_core_get_table_prefix();
    313327
    314328        // These values should only be updated if they are not already present.
    function bp_core_install_extended_profiles() { 
    393407 */
    394408function bp_core_install_blog_tracking() {
    395409        $sql             = array();
    396         $charset_collate = $GLOBALS['wpdb']->get_charset_collate();
     410        $charset_collate = bp_core_get_charset_collate();
    397411        $bp_prefix       = bp_core_get_table_prefix();
    398412
    399413        $sql[] = "CREATE TABLE {$bp_prefix}bp_user_blogs (