/** * Get a newsboard for a language. * @param GWF_Language $lang * @param int $pid rootid * @return GWF_ForumBoard */ private function getNewsForumLang(GWF_Language $lang, $pid) { $pid = (int) $pid; $title = $lang->escaped('lang_nativename'); // found old board if (false !== ($board = GDO::table('GWF_ForumBoard')->selectFirst("board_pid={$pid} AND board_title='{$title}'"))) { return $board; } /// Create new board $options = GWF_ForumBoard::GUEST_VIEW; $descr = $this->module->langISO($lang->getISO(), 'board_lang_descr', array($lang->displayName())); $board = GWF_ForumBoard::createBoard($title, $descr, $pid, $options); return $board; }