Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
08/27/2009 09:18:10 PM (17 years ago)
Author:
apeatling
Message:

Fixes #723

File:
1 edited

Legend:

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

    r1706 r1718  
    1212        var $enable_forum;
    1313        var $date_created;
    14        
    15         var $avatar_thumb;
    16         var $avatar_full;
    17        
     14
    1815        var $user_dataset;
    1916       
     
    5249                        $this->date_created = strtotime($group->date_created);
    5350                        $this->total_member_count = groups_get_groupmeta( $this->id, 'total_member_count' );
    54 
    55                         $gravatar_url = apply_filters( 'bp_gravatar_url', 'http://www.gravatar.com/avatar/' );
    56                        
    57                         if ( !$group->avatar_thumb || strpos( $group->avatar_thumb, 'none-thumbnail' ) )
    58                                 $this->avatar_thumb =  $gravatar_url . md5( $this->id . '@' . $bp->root_domain ) . '?d=identicon&s=50';
    59                         else
    60                                 $this->avatar_thumb = $group->avatar_thumb;
    61                        
    62                         if ( !$group->avatar_full || strpos( $group->avatar_thumb, 'none-' ) )
    63                                 $this->avatar_full = $gravatar_url . md5( $this->id . '@' . $bp->root_domain ) . '?d=identicon&s=150';
    64                         else
    65                                 $this->avatar_full = $group->avatar_full;
    6651                       
    6752                        if ( $get_user_dataset ) {
     
    9580                $this->enable_forum = apply_filters( 'groups_group_enable_forum_before_save', $this->enable_forum, $this->id );
    9681                $this->date_created = apply_filters( 'groups_group_date_created_before_save', $this->date_created, $this->id );
    97                 $this->avatar_thumb = apply_filters( 'groups_group_avatar_thumb_before_save', $this->avatar_thumb, $this->id );
    98                 $this->avatar_full = apply_filters( 'groups_group_avatar_full_before_save', $this->avatar_full, $this->id );
    9982
    10083                do_action( 'groups_group_before_save', $this );
     
    11194                                        enable_wire = %d,
    11295                                        enable_forum = %d,
    113                                         date_created = FROM_UNIXTIME(%d),
    114                                         avatar_thumb = %s,
    115                                         avatar_full = %s
     96                                        date_created = FROM_UNIXTIME(%d)
    11697                                WHERE
    11798                                        id = %d
     
    125106                                        $this->enable_wire,
    126107                                        $this->enable_forum,
    127                                         $this->date_created,
    128                                         $this->avatar_thumb,
    129                                         $this->avatar_full,
     108                                        $this->date_created,
    130109                                        $this->id
    131110                        );
     
    141120                                        enable_wire,
    142121                                        enable_forum,
    143                                         date_created,
    144                                         avatar_thumb,
    145                                         avatar_full
     122                                        date_created
    146123                                ) VALUES (
    147                                         %d, %s, %s, %s, %s, %s, %d, %d, FROM_UNIXTIME(%d), %s, %s
     124                                        %d, %s, %s, %s, %s, %s, %d, %d, FROM_UNIXTIME(%d)
    148125                                )",
    149126                                        $this->creator_id,
     
    155132                                        $this->enable_wire,
    156133                                        $this->enable_forum,
    157                                         $this->date_created,
    158                                         $this->avatar_thumb,
    159                                         $this->avatar_full
     134                                        $this->date_created
    160135                        );
    161136                }
Note: See TracChangeset for help on using the changeset viewer.