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

Changeset 10899


Ignore:
Timestamp:
Feb 27, 2009, 2:13:09 PM (11 years ago)
Author:
ShogoKawahara
Message:

#3294:moved friendActions::executeShowImage() to sfOpenPNEFriendAction::executeShowImage()

Location:
OpenPNE3/trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • OpenPNE3/trunk/apps/pc_frontend/config/routing.yml

    r10892 r10899  
    1313  requirements: { id: \d+ }
    1414
    15 friend_showImage:
     15friend_show_image:
    1616  url:   /friend/showImage/:id
    1717  param: { module: friend, action: showImage }
  • OpenPNE3/trunk/apps/pc_frontend/modules/friend/actions/actions.class.php

    r10888 r10899  
    1515 * @subpackage friend
    1616 * @author     Kousuke Ebihara <ebihara@tejimaya.com>
    17  * @author     Shogo Kawahara <kawahara@tejimaya.net>
    1817 */
    1918class friendActions extends sfOpenPNEFriendAction
     
    3534    parent::executeList($request);
    3635  }
    37 
    38   public function executeShowImage(sfWebRequest $request)
    39   {
    40     $this->forward404Unless($this->id);
    41 
    42     $this->member = MemberPeer::retrieveByPk($this->id);
    43     $this->forward404Unless($this->member, 'Undefined member.');
    44 
    45     return sfView::SUCCESS;
    46   }
    4736}
  • OpenPNE3/trunk/apps/pc_frontend/modules/member/templates/profileSuccess.php

    r10888 r10899  
    1111  $moreInfo[] = link_to(__('Edit Photo'), 'member/configImage');
    1212}
    13 else
     13else if ($member->getImageFileName())
    1414{
    15   if ($member->getImageFileName())
    16   {
    1715    $moreInfo[] = link_to(__("Show more Photos"), 'friend/showImage?id='.$member->getId());
    18   }
    1916}
    20 
    2117
    2218$options = array(
  • OpenPNE3/trunk/lib/action/sfOpenPNEFriendAction.class.php

    r10630 r10899  
    1515 * @subpackage action
    1616 * @author     Kousuke Ebihara <ebihara@tejimaya.com>
     17 * @author     Shogo Kawahara <kawahara@tejimaya.net>
    1718 */
    1819abstract class sfOpenPNEFriendAction extends sfActions
     
    156157    return sfView::SUCCESS;
    157158  }
     159
     160  /**
     161   * Executes show member iamges action
     162   *
     163   * @param sfRequest $request A request object
     164   */
     165  public function executeShowImage($request)
     166  {
     167    $this->forward404Unless($this->id);
     168
     169    $this->member = MemberPeer::retrieveByPk($this->id);
     170    $this->forward404Unless($this->member, 'Undefined member.');
     171
     172    return sfView::SUCCESS;
     173  }
     174
    158175}
Note: See TracChangeset for help on using the changeset viewer.