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

Changeset 12368


Ignore:
Timestamp:
Jul 23, 2009, 8:36:18 PM (10 years ago)
Author:
ShogoKawahara
Message:

#4159:fixed CommunityMemberTable::getCommunityMembersPre() doens't return data correctly

Location:
OpenPNE3/trunk/lib
Files:
2 edited

Legend:

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

    r11479 r12368  
    2121  {
    2222    $memberId = sfContext::getInstance()->getUser()->getMemberId();
    23    
     23
    2424    $this->communityMembers = Doctrine::getTable('CommunityMember')->getCommunityMembersPre($memberId);
    2525  }
  • OpenPNE3/trunk/lib/model/doctrine/CommunityMemberTable.class.php

    r12330 r12368  
    9999  public function getCommunityIdsOfAdminByMemberId($memberId)
    100100  {
    101     return $this->createQuery()
     101    $ids = array();
     102
     103    $results = $this->createQuery()
    102104        ->select('community_id')
    103105        ->where('member_id = ?', $memberId)
    104106        ->andWhere('position = ?', 'admin')
    105         ->fetchArray();
     107        ->execute();
     108
     109    foreach ($results as $result)
     110    {
     111      $ids[] = $result->getCommunityId();
     112    }
     113    return $ids;
    106114  }
    107115
     
    114122      return $this->createQuery()
    115123        ->whereIn('community_id', $adminCommunityIds)
    116         ->where('position', 'pre')
     124        ->where('position = ?', 'pre')
    117125        ->execute();
    118126    }
    119127
    120     return array();
     128    return null;
    121129  }
    122130
Note: See TracChangeset for help on using the changeset viewer.