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

Changeset 11689


Ignore:
Timestamp:
May 19, 2009, 10:55:44 AM (13 years ago)
Author:
nagasawa
Message:

#3937:fixed display of the friend request in the home

Location:
OpenPNE3/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • OpenPNE3/trunk/apps/mobile_frontend/modules/friend/templates/_cautionAboutFriendPre.php

    r10309 r11689  
    11<?php foreach ($sf_user->getMember()->getFriendPreTo() as $key => $value) : ?>
    22<font color="red">
    3 <?php $member = $value->getMemberRelatedByMemberIdFrom(); ?>
     3<?php $member = $value->getMember_2(); ?>
    44<?php echo __('Received from the friend link message from %1%!', array('%1%' => link_to(sprintf('%s', $member->getName()), 'member/profile?id='.$member->getId()))) ?>
    55&nbsp;
  • OpenPNE3/trunk/apps/pc_frontend/modules/friend/templates/_cautionAboutFriendPre.php

    r10489 r11689  
    22<p class="caution">
    33<?php
    4 $member = $value->getMemberRelatedByMemberIdFrom();
     4$member = $value->getMember_2();
    55echo __('%1% sent my friends request to you!', array('%1%' => link_to($member->getName(), 'member/profile?id='.$member->getId()))) ?>
    66&nbsp;
  • OpenPNE3/trunk/lib/model/doctrine/Member.class.php

    r11479 r11689  
    8989  }
    9090
    91   public function getFriendPreTo(Criteria $c = null)
    92   {
    93   /*
    94     if (!$c)
    95     {
    96       $c = new Criteria();
    97     }
    98     $c->add(MemberRelationshipPeer::IS_FRIEND_PRE, true);
    99     return $this->getMemberRelationshipsRelatedByMemberIdTo($c);
    100     */
    101 
    102     return array();
     91  public function getFriendPreTo(Doctrine_Query $q = null)
     92  {
     93    if (!$q)
     94    {
     95      $q = Doctrine::getTable('MemberRelationship')->createQuery();
     96    }
     97    $q->where('member_id_to = ?', $this->getId());
     98    $q->addWhere('is_friend_pre = ?', true);
     99    return $q->execute();
    103100  }
    104101
Note: See TracChangeset for help on using the changeset viewer.