操作
Enhancement(機能追加・改善) #1197
完了[optimization] MemberRelationshipTable::getFriendMemberIds() などで MemberTable::getInactiveMemberIds() の結果を in_array() するのをやめる
開始日:
2010-06-23
期日:
2010-06-23
進捗率:
100%
予定工数:
説明
Overview¶
MemberRelationshipTable::getFriendMemberIds() などで MemberTable::getInactiveMemberIds() の結果を in_array() するのをやめる
具体的には以下のような変更になる。
Index: MemberTable.class.php =================================================================== --- MemberTable.class.php (revision 40763) +++ MemberTable.class.php (revision 40764) @@ -65,7 +65,7 @@ $memberIds = array(); foreach ($members as $member) { - $memberIds[] = $member[0]; + $memberIds[$member[0]] = $member[0]; } return $memberIds;
Index: MemberRelationshipTable.class.php =================================================================== --- MemberRelationshipTable.class.php (revision 40763) +++ MemberRelationshipTable.class.php (revision 40764) @@ -67,7 +67,7 @@ foreach ($friendMemberIds as $friend) { - if (!in_array($friend[0], $inactiveMemberIds)) + if (!isset($inactiveMemberIds[$friend[0]])) { $result[] = $friend[0]; }
操作