/** * @see Form::save() */ public function save() { parent::save(); // save board if (WCF::getUser()->getPermission('admin.board.canAddBoard')) { $this->board = BoardEditor::create($this->parentID, $this->position ? $this->position : null, $this->title, $this->description, $this->boardType, $this->image, $this->imageNew, $this->imageShowAsBackground, $this->imageBackgroundRepeat, $this->externalURL, TIME_NOW, $this->prefixes, $this->prefixMode, $this->prefixRequired, $this->styleID, $this->enforceStyle, $this->daysPrune, $this->sortField, $this->sortOrder, $this->postSortOrder, $this->closed, $this->countUserPosts, $this->invisible, $this->showSubBoards, $this->allowDescriptionHtml, $this->enableRating, $this->threadsPerPage, $this->postsPerPage, $this->searchable, $this->searchableForSimilarThreads, $this->ignorable, $this->enableMarkingAsDone, $this->additionalFields); } // save permissions if (WCF::getUser()->getPermission('admin.board.canEditPermissions')) { $this->savePermissions(); } // save moderators if (WCF::getUser()->getPermission('admin.board.canEditModerators')) { $this->saveModerators(); } // reset cache $this->resetCache(); $this->saved(); // reset values $this->boardType = $this->parentID = $this->prefixRequired = $this->styleID = $this->threadsPerPage = $this->postsPerPage = 0; $this->enforceStyle = $this->daysPrune = $this->closed = $this->invisible = $this->allowDescriptionHtml = $this->prefixMode = 0; $this->enableMarkingAsDone = 0; $this->countUserPosts = $this->showSubBoards = $this->imageShowAsBackground = $this->searchable = $this->searchableForSimilarThreads = $this->ignorable = 1; $this->position = $this->title = $this->description = $this->image = $this->imageNew = $this->externalURL = $this->prefixes = $this->sortField = $this->sortOrder = $this->postSortOrder = ''; $this->permissions = $this->moderators = array(); $this->enableRating = -1; $this->imageBackgroundRepeat = 'no-repeat'; // show success message WCF::getTPL()->assign(array('board' => $this->board, 'success' => true)); }