Show
Ignore:
Timestamp:
10/03/08 12:53:45 (3 months ago)
Author:
riaf
Message:

どうやらローカルではそれなりに更新してあったらしい。どこまでやってるかわからないけどとりあえずコミットしておく。あとでちゃんと見ますごめんなさいごめんなさい。

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • events/phpframework/rhaco/trunk/library/PhwittrUser.php

    r20592 r20593  
    168168    } 
    169169     
     170    function friend_requests(){ 
     171        $user = $this->loginRequired(); 
     172        if($user->privateFlag == false){ 
     173            Header::redirect(Rhaco::url('home')); 
     174        } 
     175        $parser = $this->read(new StandBy(), new C(Q::eq(StandBy::columnRequestId(), $user->getId()), Q::fact())); 
     176        $parser->setTemplate(Rhaco::constant('THEME').'/friend_requests.html'); 
     177        $parser->setVariable('user', $user); 
     178        $parser->setVariable('following', $this->_getFollowing($user)); 
     179        return $parser; 
     180    } 
     181    function acceptRequest($id){ 
     182        $user = $this->loginRequired(); 
     183        $request = $this->dbUtil->get(new StandBy($id)); 
     184        if(Variable::istype('TableObjectBase', $request) && $request->requestId == $user->id){ 
     185            $request->accept($this->dbUtil); 
     186        } 
     187        Header::redirect(Rhaco::url('friend_requests')); 
     188    } 
     189    function denyRequest($id){ 
     190        $user = $this->loginRequired(); 
     191        $request = $this->dbUtil->get(new StandBy($id)); 
     192        if(Variable::istype('TableObjectBase', $request) && $request->requestId == $user->id){ 
     193            $request->deny($this->dbUtil); 
     194        } 
     195        Header::redirect(Rhaco::url('friend_requests')); 
     196    } 
     197     
    170198    function login(){ 
    171199        $user = $this->loginRequired();