Skip to:
Content

BuddyPress.org

Ticket #8227: 8227.patch

File 8227.patch, 3.9 KB (added by passoniate, 6 years ago)

Patch

  • src/bp-core/classes/class-bp-recursive-query.php

     
    8484                        if ( 'relation' === $key ) {
    8585                                $relation = $query['relation'];
    8686                        } elseif ( is_array( $clause ) ) {
    87                                 // This is a first-order clause
     87                                // This is a first-order clause.
    8888                                if ( $this->is_first_order_clause( $clause ) ) {
    8989                                        $clause_sql = $this->get_sql_for_clause( $clause, $query );
    9090
     
    9898                                        }
    9999
    100100                                        $sql_chunks['join'] = array_merge( $sql_chunks['join'], $clause_sql['join'] );
    101                                 // This is a subquery
     101                                // This is a subquery.
    102102                                } else {
    103103                                        $clause_sql = $this->get_sql_for_query( $clause, $depth + 1 );
    104104
     
    108108                        }
    109109                }
    110110
    111                 // Filter empties
     111                // Filter empties.
    112112                $sql_chunks['join']  = array_filter( $sql_chunks['join'] );
    113113                $sql_chunks['where'] = array_filter( $sql_chunks['where'] );
    114114
  • src/bp-core/classes/class-bp-user-query.php

     
    183183                         */
    184184                        do_action_ref_array( 'bp_pre_user_query_construct', array( &$this ) );
    185185
    186                         // Get user ids
     186                        // Get user ids.
    187187                        // If the user_ids param is present, we skip the query.
    188188                        if ( false !== $this->query_vars['user_ids'] ) {
    189189                                $this->user_ids = wp_parse_id_list( $this->query_vars['user_ids'] );
  • src/bp-core/deprecated/1.2.php

     
    2222        _deprecated_function( __FUNCTION__, '1.2', 'bp_activity_get()' );
    2323
    2424        $defaults = array(
    25                 'max' => false, // Maximum number of results to return
    26                 'page' => 1, // page 1 without a per_page will result in no pagination.
    27                 'per_page' => false, // results per page
    28                 'sort' => 'DESC', // sort ASC or DESC
    29                 'display_comments' => false, // false for no comments. 'stream' for within stream display, 'threaded' for below each activity item
     25                'max'              => false,  // Maximum number of results to return.
     26                'page'             => 1,      // Page 1 without a per_page will result in no pagination.
     27                'per_page'         => false,  // Results per page.
     28                'sort'             => 'DESC', // Sort ASC or DESC.
     29                'display_comments' => false,  // False for no comments. 'stream' for within stream display, 'threaded' for below each activity item.
    3030
    31                 'search_terms' => false, // Pass search terms as a string
    32                 'show_hidden' => false, // Show activity items that are hidden site-wide?
     31                'search_terms'     => false,  // Pass search terms as a string.
     32                'show_hidden'      => false, // Show activity items that are hidden site-wide?
    3333
    3434                /**
    3535                 * Pass filters as an array:
    3636                 * array(
    37                  *      'user_id' => false, // user_id to filter on
    38                  *      'object' => false, // object to filter on e.g. groups, profile, status, friends
    39                  *      'action' => false, // action to filter on e.g. new_wire_post, new_forum_post, profile_updated
    40                  *      'primary_id' => false, // object ID to filter on e.g. a group_id or forum_id or blog_id etc.
    41                  *      'secondary_id' => false, // secondary object ID to filter on e.g. a post_id
     37                 *      'user_id'      => false,  // user_id to filter on.
     38                 *      'object'       => false,  // Object to filter on e.g. groups, profile, status, friends.
     39                 *      'action'       => false,  // Action to filter on e.g. new_wire_post, new_forum_post, profile_updated.
     40                 *      'primary_id'   => false,  // Object ID to filter on e.g. a group_id or forum_id or blog_id etc.
     41                 *      'secondary_id' => false,  // Secondary object ID to filter on e.g. a post_id.
    4242                 * );
    4343                 */
    4444                'filter' => array()