Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
11/26/2014 06:08:03 AM (12 years ago)
Author:
r-a-y
Message:

Messages: Introduces meta table and related cache functions.

This commit alters the messages DB schema to add a meta table, which will
allow plugin developers to record information about a message.

The new message meta functions in bp-messages-functions.php mirrors those
in other BP components (activity, groups, etc.).

The DB version is also bumped to 9181.

See #3083.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-messages/bp-messages-loader.php

    r8481 r9182  
    9191                        'table_name_notices'    => $bp->table_prefix . 'bp_messages_notices',
    9292                        'table_name_messages'   => $bp->table_prefix . 'bp_messages_messages',
    93                         'table_name_recipients' => $bp->table_prefix . 'bp_messages_recipients'
    94                 );
     93                        'table_name_recipients' => $bp->table_prefix . 'bp_messages_recipients',
     94                        'table_name_meta'       => $bp->table_prefix . 'bp_messages_meta',
     95                );
     96
     97                // Metadata tables for messaging component
     98                $meta_tables = array(
     99                        'message' => $bp->table_prefix . 'bp_messages_meta',
     100                );
     101
     102                $this->autocomplete_all = defined( 'BP_MESSAGES_AUTOCOMPLETE_ALL' );
    95103
    96104                // All globals for messaging component.
    97105                // Note that global_tables is included in this array.
    98                 $globals = array(
     106                parent::setup_globals( array(
    99107                        'slug'                  => BP_MESSAGES_SLUG,
    100108                        'has_directory'         => false,
    101109                        'notification_callback' => 'messages_format_notifications',
    102110                        'search_string'         => __( 'Search Messages...', 'buddypress' ),
    103                         'global_tables'         => $global_tables
    104                 );
    105 
    106                 $this->autocomplete_all = defined( 'BP_MESSAGES_AUTOCOMPLETE_ALL' );
    107 
    108                 parent::setup_globals( $globals );
     111                        'global_tables'         => $global_tables,
     112                        'meta_tables'           => $meta_tables
     113                ) );
    109114        }
    110115
Note: See TracChangeset for help on using the changeset viewer.