Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
11/07/2010 12:20:02 AM (14 years ago)
Author:
djpaul
Message:

Fixes even more WP_DEBUG warnings.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-groups/bp-groups-classes.php

    r3365 r3369  
    261261        global $wpdb, $bp;
    262262
     263        $pag_sql = '';
    263264        if ( $limit && $page )
    264265            $pag_sql = $wpdb->prepare( " LIMIT %d, %d", intval( ( $page - 1 ) * $limit), intval( $limit ) );
    265266
     267        $hidden_sql = '';
    266268        if ( !is_user_logged_in() || ( !is_super_admin() && ( $user_id != $bp->loggedin_user->id ) ) )
    267269            $hidden_sql = "AND g.status != 'hidden'";
    268270
     271        $search_sql = '';
    269272        if ( $search_terms ) {
    270273            $search_terms = like_escape( $wpdb->escape( $search_terms ) );
     
    282285
    283286        if ( !empty( $populate_extras ) ) {
     287            $group_ids = array();
    284288            foreach ( (array)$paged_groups as $group ) $group_ids[] = $group->id;
    285289            $group_ids = $wpdb->escape( join( ',', (array)$group_ids ) );
     
    316320        }
    317321
    318         $group_ids = array();
    319322        if ( !empty( $populate_extras ) ) {
     323            $group_ids = array();
    320324            foreach ( (array)$paged_groups as $group ) $group_ids[] = $group->id;
    321325            $group_ids = $wpdb->escape( join( ',', (array)$group_ids ) );
     
    329333        global $wpdb, $bp;
    330334
     335        $pag_sql = '';
    331336        if ( $limit && $page ) {
    332337            $pag_sql = $wpdb->prepare( " LIMIT %d, %d", intval( ( $page - 1 ) * $limit), intval( $limit ) );
    333338        }
    334339
     340        $hidden_sql = '';
    335341        if ( !is_user_logged_in() || ( !is_super_admin() && ( $user_id != $bp->loggedin_user->id ) ) )
    336342            $hidden_sql = "AND g.status != 'hidden'";
    337343
     344        $search_sql = '';
    338345        if ( $search_terms ) {
    339346            $search_terms = like_escape( $wpdb->escape( $search_terms ) );
     
    351358
    352359        if ( !empty( $populate_extras ) ) {
     360            $group_ids = array();
    353361            foreach ( (array)$paged_groups as $group ) $group_ids[] = $group->id;
    354362            $group_ids = $wpdb->escape( join( ',', (array)$group_ids ) );
     
    362370        global $wpdb, $bp;
    363371
     372        $pag_sql = '';
    364373        if ( $limit && $page )
    365374            $pag_sql = $wpdb->prepare( " LIMIT %d, %d", intval( ( $page - 1 ) * $limit), intval( $limit ) );
    366375
     376        $hidden_sql = '';
    367377        if ( !is_user_logged_in() || ( !is_super_admin() && ( $user_id != $bp->loggedin_user->id ) ) )
    368378            $hidden_sql = " AND g.status != 'hidden'";
    369379
     380        $search_sql = '';
    370381        if ( $search_terms ) {
    371382            $search_terms = like_escape( $wpdb->escape( $search_terms ) );
     
    383394
    384395        if ( !empty( $populate_extras ) ) {
     396            $group_ids = array();
    385397            foreach ( (array)$paged_groups as $group ) $group_ids[] = $group->id;
    386398            $group_ids = $wpdb->escape( join( ',', (array)$group_ids ) );
     
    824836        global $wpdb, $bp;
    825837
     838        $pag_sql = '';
    826839        if ( $limit && $page )
    827840            $pag_sql = $wpdb->prepare( " LIMIT %d, %d", intval( ( $page - 1 ) * $limit), intval( $limit ) );
Note: See TracChangeset for help on using the changeset viewer.