/** * We install one root board per default. Return empty string on success or error msg. * @param $forum * @return string */ public static function installRoot(Module_Forum $forum) { $table = GDO::table('GWF_ForumBoard'); # Do we have a root? if (false !== ($board = GWF_ForumBoard::getByID(1))) { return ''; } $root = new GWF_ForumBoard(array('board_bid' => 1, 'board_pid' => 0, 'board_gid' => 0, 'board_pos' => 0, 'board_options' => GWF_ForumBoard::GUEST_VIEW, 'board_title' => GWF_SITENAME, 'board_descr' => 'Forums', 'board_postcount' => 0, 'board_threadcount' => 0)); if (false === $root->insert()) { return GWF_HTML::err('ERR_DATABASE', __FILE__, __LINE__); } return ''; }