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

Changeset 8847


Ignore:
Timestamp:
Oct 28, 2008, 2:26:57 PM (12 years ago)
Author:
ebihara
Message:

#2885:added community/joinlist for mobile phone

Location:
OpenPNE3/trunk/apps/mobile_frontend/modules/community
Files:
1 added
1 edited

Legend:

Unmodified
Added
Removed
  • OpenPNE3/trunk/apps/mobile_frontend/modules/community/actions/actions.class.php

    r8820 r8847  
    66 * @package    OpenPNE
    77 * @subpackage community
    8  * @author     Your name here
     8 * @author     Kousuke Ebihara <ebihara@tejimaya.com>
    99 * @version    SVN: $Id: actions.class.php 9301 2008-05-27 01:08:46Z dwhittle $
    1010 */
    1111class communityActions extends sfActions
    1212{
     13  public function preExecute()
     14  {
     15    $this->id = $this->getRequestParameter('id');
     16
     17    $this->isCommunityMember = CommunityMemberPeer::isMember($this->getUser()->getMemberId(), $this->id);
     18    $this->isAdmin = CommunityMemberPeer::isAdmin($this->getUser()->getMemberId(), $this->id);
     19    $this->isEditCommunity = $this->isAdmin;
     20  }
     21
    1322 /**
    14   * Executes index action
     23  * Executes joinlist action
    1524  *
    1625  * @param sfRequest $request A request object
    1726  */
    18   public function executeIndex($request)
     27  public function executeJoinlist($request)
    1928  {
    20     $this->forward('default', 'module');
     29    $memberId = $request->getParameter('member_id', $this->getUser()->getMemberId());
     30
     31    $this->member = MemberPeer::retrieveByPK($memberId);
     32    $this->forward404Unless($this->member);
     33
     34    $this->pager = CommunityPeer::getJoinCommunityListPager($memberId, $request->getParameter('page', 1));
     35
     36    if (!$this->pager->getNbResults()) {
     37      return sfView::ERROR;
     38    }
     39
     40    return sfView::SUCCESS;
    2141  }
    2242}
Note: See TracChangeset for help on using the changeset viewer.