/** * Undelete this topic */ public function undelete() { $post = new titania_post(); $post->topic = $this; $sql = 'SELECT * FROM ' . TITANIA_POSTS_TABLE . ' WHERE topic_id = ' . (int) $this->topic_id; $result = phpbb::$db->sql_query($sql); while ($row = phpbb::$db->sql_fetchrow($result)) { $post->__set_array($row); $post->set_sql_data($row); $post->undelete(); } phpbb::$db->sql_freeresult($result); }