ここの情報は古いです。ご理解頂いた上でお取り扱いください。

Ignore:
Timestamp:
Mar 12, 2009, 9:46:32 PM (13 years ago)
Author:
ShogoKawahara
Message:

fixed Profile page doesn't shuffle friend and community list

File:
1 edited

Legend:

Unmodified
Added
Removed
  • OpenPNE3/trunk/lib/action/sfOpenPNEMemberAction.class.php

    r10927 r11013  
    116116    $this->forward404Unless($this->member, 'Undefined member.');
    117117
    118     $this->communities = CommunityPeer::retrievesByMemberId($id);
     118    $c = new Criteria();
     119    $c->addAscendingOrderByColumn(Propel::getDB()->random(time()));
     120
     121    if (!$this->friendsSize)
     122    {
     123      $this->friendsSize = 9;
     124    }
     125    $this->friends = $this->member->getFriends($this->friendsSize, $c);
     126
     127    if (!$this->communitiesSize)
     128    {
     129      $this->communitiesSize = 9;
     130    }
     131    $this->communities = $this->member->getJoinCommunities($this->communitiesSize, $c);
    119132    $this->crownIds = CommunityMemberPeer::getCommunityIdsOfAdminByMemberId($id);
    120133
Note: See TracChangeset for help on using the changeset viewer.