コード例 #1
0
 /**
  * @see Action::execute()
  */
 public function execute()
 {
     parent::execute();
     // check permission
     WCF::getUser()->checkPermission('admin.language.canEditLanguage');
     // export language
     require_once WCF_DIR . 'lib/system/language/LanguageEditor.class.php';
     $language = new LanguageEditor($this->languageID);
     if (!$language->getLanguageID()) {
         throw new IllegalLinkException();
     }
     // send headers
     header('Content-Type: text/xml; charset=' . CHARSET);
     header('Content-Disposition: attachment; filename="' . $language->getLanguageCode() . '.xml"');
     // export
     $language->export();
     $this->executed();
 }