Skip to:
Content

BuddyPress.org

Changeset 3542


Ignore:
Timestamp:
12/19/2010 02:00:55 PM (14 years ago)
Author:
djpaul
Message:

Fixes some more PHP notices

Location:
trunk
Files:
7 edited

Legend:

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

    r3450 r3542  
    284284        global $wpdb, $bp;
    285285
     286        $pag_sql = '';
    286287        if ( $limit && $page )
    287288            $pag_sql = $wpdb->prepare( " LIMIT %d, %d", intval( ( $page - 1 ) * $limit), intval( $limit ) );
  • trunk/bp-forums/bp-forums-filters.php

    r3474 r3542  
    101101    global $bp;
    102102
    103     if ( $bp->current_action == 'forum' && $bp->action_variables[0] == 'topic' ) {
    104         if ( bp_has_forum_topic_posts() ) {
     103    if ( $bp->current_action == 'forum' && !empty( $bp->action_variables[0] ) && 'topic' == $bp->action_variables[0] )
     104        if ( bp_has_forum_topic_posts() )
    105105            $title .= ' | ' . bp_get_the_topic_title();
    106         }
    107     }
    108106
    109107    return $title;
  • trunk/bp-friends.php

    r3515 r3542  
    259259
    260260function friends_delete_activity( $args ) {
     261    global $bp;
     262
    261263    if ( function_exists('bp_activity_delete_by_item_id') ) {
    262264        extract( (array)$args );
  • trunk/bp-groups/bp-groups-classes.php

    r3541 r3542  
    10061006        global $bp, $wpdb;
    10071007
     1008        $pag_sql = '';
    10081009        if ( $limit && $page )
    10091010            $pag_sql = $wpdb->prepare( "LIMIT %d, %d", intval( ( $page - 1 ) * $limit), intval( $limit ) );
    10101011
     1012        $exclude_admins_sql = '';
    10111013        if ( $exclude_admins_mods )
    10121014            $exclude_admins_sql = $wpdb->prepare( "AND is_admin = 0 AND is_mod = 0" );
    10131015
     1016        $banned_sql = '';
    10141017        if ( $exclude_banned )
    10151018            $banned_sql = $wpdb->prepare( " AND is_banned = 0" );
    10161019
     1020        $exclude_sql = '';
    10171021        if ( $exclude )
    10181022            $exclude_sql = $wpdb->prepare( " AND m.user_id NOT IN ({$exclude})" );
     
    10261030            return false;
    10271031
    1028         if ( !isset($pag_sql) )
    1029             $total_member_count = count($members);
     1032        if ( empty( $pag_sql ) )
     1033            $total_member_count = count( $members );
    10301034        else
    10311035            $total_member_count = $wpdb->get_var( $wpdb->prepare( "SELECT COUNT(user_id) FROM {$bp->groups->table_name_members} WHERE group_id = %d AND is_confirmed = 1 {$banned_sql} {$exclude_admins_sql} {$exclude_sql}", $group_id ) );
  • trunk/bp-groups/bp-groups-templatetags.php

    r3541 r3542  
    15041504        global $members_template;
    15051505
    1506         if ( null === $members_template->member->is_friend )
     1506        if ( !isset( $members_template->member->is_friend ) )
    15071507            $friend_status = 'not_friends';
    15081508        else
  • trunk/bp-messages/bp-messages-classes.php

    r3520 r3542  
    8181        global $wpdb, $bp;
    8282
     83        $pag_sql = '';
    8384        if ( $limit && $page )
    8485            $pag_sql = $wpdb->prepare( " LIMIT %d, %d", intval( ( $page - 1 ) * $limit), intval( $limit ) );
    8586
     87        $type_sql = '';
    8688        if ( $type == 'unread' )
    8789            $type_sql = $wpdb->prepare( " AND r.unread_count != 0 " );
    88         else if ( $type == 'read' )
     90        elseif ( $type == 'read' )
    8991            $type_sql = $wpdb->prepare( " AND r.unread_count = 0 " );
    9092
  • trunk/bp-xprofile/bp-xprofile-classes.php

    r3509 r3542  
    116116        $r = wp_parse_args( $args, $defaults );
    117117        extract( $r, EXTR_SKIP );
    118 
    119         $group_id_sql = '';
     118        $where_sql = '';
     119
    120120        if ( $profile_group_id )
    121121            $where_sql = $wpdb->prepare( 'WHERE g.id = %d', $profile_group_id );
    122         else if ( $exclude_groups )
     122        elseif ( $exclude_groups )
    123123            $where_sql = $wpdb->prepare( "WHERE g.id NOT IN ({$exclude_groups})");
    124124
     
    141141            return $groups;
    142142
     143        $exclude_fields_sql = '';
    143144        if ( $exclude_fields )
    144145            $exclude_fields_sql = $wpdb->prepare( "AND id NOT IN ({$exclude_fields})" );
Note: See TracChangeset for help on using the changeset viewer.