Development

Changeset 4006

You must first sign up to be able to contribute.

Changeset 4006

Show
Ignore:
Timestamp:
05/15/07 17:26:19 (1 year ago)
Author:
superhaggis
Message:

Added initial viewThread and viewPost logic.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • plugins/sfBBPlugin/modules/sfBB/lib/sfBBPlugin_sfBBActions.class.php

    r3985 r4006  
    6666  public function executeViewThread() 
    6767  { 
     68    $c = new Criteria(); 
     69    $c->add(sfBBPostPeer::ID, $this->getRequestParameter('id')); 
     70    $c->add(sfBBPostPeer::STRIPPED_TITLE, $this->getRequestParameter('stripped_title')); 
     71    $c->add(sfBBPostPeer::PARENT_ID, null); 
     72    $thread = sfBBPostPeer::doSelectOne($c); 
     73 
     74    $this->forward404Unless($thread instanceof sfBBPost); 
     75 
     76    $this->thread = $thread; 
    6877  } 
    6978 
    7079  public function executeViewPost() 
    7180  { 
     81    $c = new Criteria(); 
     82    $c->add(sfBBPostPeer::ID, $this->getRequestParameter('id')); 
     83    $c->add(sfBBPostPeer::STRIPPED_TITLE, $this->getRequestParameter('stripped_title')); 
     84    $post = sfBBPostPeer::doSelectOne($c); 
     85 
     86    $this->forward404Unless($post instanceof sfBBPost); 
     87 
     88    $this->post = $post; 
    7289  } 
    7390