/** * @see Form::save() */ public function save() { parent::save(); if ($this->mode == 'copy') { $this->language = LanguageEditor::create(StringUtil::toLowerCase($this->languageCode)); $this->sourceLanguage->copy($this->language); } // add language to this package. $sql = "INSERT IGNORE INTO\twcf" . WCF_N . "_language_to_packages\n\t\t\t\t\t\t(languageID, packageID)\n\t\t\tVALUES\t\t\t(" . $this->language->getLanguageID() . ", \n\t\t\t\t\t\t" . PACKAGE_ID . ")"; WCF::getDB()->sendQuery($sql); Language::clearCache(); $this->saved(); // show success message WCF::getTPL()->assign('success', true); }