$this->_postClass->setTopicID( $this->request['t'] );
$this->_postClass->setPostID( $this->request['p'] );
$this->_postClass->setForumID( $this->request['f'] );
# Topic Title and description - use _POST as it is cleaned in the function.
# We wrap this because the title may not be set when showing a form and would
# throw a length error
if ( $_POST['TopicTitle'] )
{
$this->_postClass->setTopicTitle( $_POST['TopicTitle'] );
$this->_postClass->setTopicDescription( $_POST['TopicDesc'] );
}
# Is Preview Mode
$this->_postClass->setIsPreview( ( $this->request['preview'] ) ? TRUE : FALSE );
# Forum Data
$this->_postClass->setForumData( $this->registry->getClass('class_forums')->forum_by_id[ $this->request['f'] ] );
# Topic Data
$this->_postClass->setTopicData( $this->DB->buildAndFetch( array(
'select' => 't.*, p.poll_only',
'from' => array( 'topics' => 't' ),
'where' => "t.forum_id={$this->_postClass->getForumID()} AND t.tid={$this->_postClass->getTopicID()}",
'add_join' => array(
array(
'type' => 'left',
'from' => array( 'polls' => 'p' ),
'where' => 'p.tid=t.tid'
)
)
/* (T30) Hide Content */
$this->cache->updateCacheWithoutSaving( 'tb_hide_topic', array( 'tid' => $this->_postClass->getTopicID(), 'starter_id' => $this->_postClass->getTopicData('starter_id'), 'last_poster_id' => $this->_postClass->getTopicData('last_poster_id') ) );
# Published
$this->_postClass->setPublished( $this->_checkPostModeration( $doCodes[ $do ][1] ) === TRUE ? TRUE : FALSE );
# Post Content
$this->_postClass->setPostContent( isset( $_POST['Post'] ) ? $_POST['Post'] : '' );
# Set Author
$this->_postClass->setAuthor( $this->memberData['member_id'] );
# Mod Options
$this->_postClass->setModOptions( $this->request['mod_options'] );
# Set Settings
if ( ! $doCodes[ $do ][0] )
{
if ( $this->_postClass->getIsPreview() !== TRUE )
{