private function onEditBoard() { $form = $this->getForm(); if (false !== ($error = $form->validate($this->module))) { return $error; } if (!$this->board->isRoot()) { $bid = $this->board->getID(); if ($bid !== ($newpid = (int) $form->getVar('moveboard'))) { if ($this->board->getParentID() !== $newpid) { if (false !== ($newparent = GWF_ForumBoard::getBoard($newpid))) { if (false === $this->board->move($newparent)) { return GWF_HTML::err('ERR_DATABASE', array(__FILE__, __LINE__)); } } } } } $this->board->saveVars(array('board_gid' => $form->getVar('groupid'), 'board_title' => $form->getVar('title'), 'board_descr' => $form->getVar('descr'))); # Options $this->board->saveOption(GWF_ForumBoard::ALLOW_THREADS, Common::getPost('allow_threads') !== false); $this->board->saveOption(GWF_ForumBoard::LOCKED, Common::getPost('is_locked') !== false); $this->board->saveOption(GWF_ForumBoard::GUEST_POSTS, Common::getPost('guests') !== false); $this->board->saveOption(GWF_ForumBoard::GUEST_VIEW, Common::getPost('guest_view') !== false); if (!$this->board->isRoot()) { $this->board->saveOption(GWF_ForumBoard::INVISIBLE, Common::getPost('invisible') !== false); } return $this->module->message('msg_edited_board', array($this->board->getShowBoardHREF())); }