/** * Updates the lastpost_at field in this post's Thread and saves the post */ public function save(PropelPDO $con = null) { //Set the ID and lastpost_at to the right values $c = new Criteria(); $c->add(ThreadPeer::ID, $this->getThreadId()); $c->add(ThreadPeer::LASTPOST_AT, time()); //Update the thread table ThreadPeer::doUpdate($c); $new = $this->isNew(); $ret = parent::save($con); if ($new) { HistoryPeer::createFor($this); } return $ret; }