public static function insertTopic(ForumTopic $t) { global $db, $user; $db->query("\n\t\t\t\tINSERT INTO " . TABLE_TOPICS . "\n\t\t\t\t(forum_id, topic_title, user_id, topic_time, last_post_time)\n\t\t\t\tVALUES\n\t\t\t\t(:fid, :title, :uid, :ttime, :ptime)\n\t\t\t", array($t->getForumID(), $t->getTitle(), $user->getUserID(), $t->getFirstPost()->getDate(), $t->getFirstPost()->getDate())); $topicID = $db->insert_id(); $user->addPoints(Config::get('points_newtopic')); return $topicID; }