/** * @see Form::save() */ public function save() { ACPForm::save(); // read form data $this->host->title = $this->title; $this->host->hostname = $this->hostname; $this->host->isFallback = $this->isFallback; $this->host->languageCode = $this->languageCode; // save $this->host->update(); // show success message WCF::getTPL()->assign('success', true); // remove cache HostEditor::clearCache(); // call event $this->saved(); }
/** * @see Form::save() */ public function save() { parent::save(); // create host $this->newHost = HostEditor::create($this->title, $this->hostname, false, $this->isFallback, $this->languageID); // reset fields $this->title = $this->hostname = ''; $this->languageID = 0; $this->isFallback = false; // display success field WCF::getTPL()->assign('success', true); // remove cache HostEditor::clearCache(); // call event $this->saved(); }