From 9a47ccf0addaf26d9d38dd07fe0a6c15136c61da Mon Sep 17 00:00:00 2001 From: =?utf8?q?Tim=20D=C3=BCsterhus?= Date: Wed, 2 Jan 2013 00:02:09 +0100 Subject: [PATCH] Revert "Merge remote branch 'acp.language/master'" This reverts commit 9265d52d1e4030c3928145017ddbc3e221549f98, reversing changes made to 845907323978d1e5a5d499c4ca1224c8e6529af7. --- .gitignore | 2 +- acpMenu.xml | 38 --- acptemplates/languageAdd.tpl | 137 ----------- acptemplates/languageExport.tpl | 72 ------ acptemplates/languageList.tpl | 143 ------------ acptemplates/languageMultilingualism.tpl | 55 ----- acptemplates/languageServerAdd.tpl | 59 ----- acptemplates/languageServerList.tpl | 106 --------- files/lib/acp/form/LanguageAddForm.class.php | 217 ------------------ .../lib/acp/form/LanguageExportForm.class.php | 156 ------------- .../LanguageMultilingualismForm.class.php | 153 ------------ .../acp/form/LanguageServerAddForm.class.php | 103 --------- .../acp/form/LanguageServerEditForm.class.php | 95 -------- files/lib/acp/page/LanguageListPage.class.php | 70 ------ .../acp/page/LanguageServerListPage.class.php | 58 ----- language/de.xml | 42 ---- package.xml | 13 -- userGroupOption.xml | 21 -- 18 files changed, 1 insertion(+), 1539 deletions(-) delete mode 100644 acptemplates/languageAdd.tpl delete mode 100644 acptemplates/languageExport.tpl delete mode 100644 acptemplates/languageList.tpl delete mode 100644 acptemplates/languageMultilingualism.tpl delete mode 100644 acptemplates/languageServerAdd.tpl delete mode 100644 acptemplates/languageServerList.tpl delete mode 100644 files/lib/acp/form/LanguageAddForm.class.php delete mode 100644 files/lib/acp/form/LanguageExportForm.class.php delete mode 100644 files/lib/acp/form/LanguageMultilingualismForm.class.php delete mode 100644 files/lib/acp/form/LanguageServerAddForm.class.php delete mode 100644 files/lib/acp/form/LanguageServerEditForm.class.php delete mode 100644 files/lib/acp/page/LanguageListPage.class.php delete mode 100644 files/lib/acp/page/LanguageServerListPage.class.php diff --git a/.gitignore b/.gitignore index f9b443bb26..d9b96dd61c 100644 --- a/.gitignore +++ b/.gitignore @@ -47,4 +47,4 @@ nbactions.xml # Community Framework # Ignore packages build directly in the workspace. They can however be added manually via git add, if wanted. *.tar -*.tar.gz +*.tar.gz \ No newline at end of file diff --git a/acpMenu.xml b/acpMenu.xml index 2cd86b52dc..433d9a45c7 100644 --- a/acpMenu.xml +++ b/acpMenu.xml @@ -28,43 +28,5 @@ 3 - - - wcf.acp.menu.link.display - - - - wcf.acp.menu.link.language - - admin.language.canEditLanguage,admin.language.canDeleteLanguage - - - - wcf.acp.menu.link.language - - admin.language.canAddLanguage - - - - wcf.acp.menu.link.language - - admin.language.canEditLanguage - - - - wcf.acp.menu.link.language - - - - - wcf.acp.menu.link.language.server - admin.language.canEditServer,admin.language.canDeleteServer - - - - - wcf.acp.menu.link.language.server - admin.language.canAddServer - diff --git a/acptemplates/languageAdd.tpl b/acptemplates/languageAdd.tpl deleted file mode 100644 index 507ce64167..0000000000 --- a/acptemplates/languageAdd.tpl +++ /dev/null @@ -1,137 +0,0 @@ -{include file='header' pageTitle='wcf.acp.language.add'} - - - -
-
-

{lang}wcf.acp.language.add{/lang}

-
-
- -{if $errorField} -

{lang}wcf.global.form.error{/lang}

-{/if} - -{if $success|isset} -

{lang}wcf.global.form.add.success{/lang}

-{/if} - -{hascontent} -
- -
-{/hascontent} - -
-
-
- {lang}wcf.acp.language.add.mode{/lang} - -
-
- - -
-
-
- -
- {lang}wcf.acp.language.import.source{/lang} - - -
-
- - {if $errorField == 'languageFile'} - - {if $errorType == 'empty'} - {lang}wcf.global.error.empty{/lang} - {else} - {lang}wcf.acp.language.import.error{/lang} {$errorType} - {/if} - - {/if} - {lang}wcf.acp.language.import.source.file.description{/lang} -
- - - -
-
- - {if $errorField == 'languageUpload'} - - {lang}wcf.acp.language.import.error{/lang} {$errorType} - - {/if} -
- -
- -
- {lang}wcf.acp.language.add.new{/lang} - - -
-
- - {if $errorField == 'languageCode'} - - {if $errorType == 'empty'} - {lang}wcf.global.error.empty{/lang} - {else} - {lang}wcf.acp.language.add.languageCode.error.{@$errorType}{/lang} - {/if} - - {/if} - {lang}wcf.acp.language.code.description{/lang} -
- - - -
-
- - {if $errorField == 'sourceLanguageID'} - - {if $errorType == 'empty'} - {lang}wcf.global.error.empty{/lang} - {else} - {lang}wcf.acp.language.add.source.error.{@$errorType}{/lang} - {/if} - - {/if} -
- -
- - {event name='fieldsets'} -
- -
- -
-
- -{include file='footer'} diff --git a/acptemplates/languageExport.tpl b/acptemplates/languageExport.tpl deleted file mode 100644 index e0e2af949f..0000000000 --- a/acptemplates/languageExport.tpl +++ /dev/null @@ -1,72 +0,0 @@ -{include file='header' pageTitle='wcf.acp.language.export'} - -
-
-

{lang}wcf.acp.language.export{/lang}

-
-
- -{if $errorField} -

{lang}wcf.global.form.error{/lang}

-{/if} - -{if $success|isset} -

{lang}wcf.acp.language.add.success{/lang}

-{/if} - -{hascontent} -
- -
-{/hascontent} - -
-
-
- {lang}wcf.acp.language.export{/lang} - -
-
-
- {htmlOptions options=$languages selected=$languageID name='languageID' id='languageID'} -
-
- -
-
-
- -
-
- -
-
- -
-
-
-
- -
- -
-
- -{include file='footer'} \ No newline at end of file diff --git a/acptemplates/languageList.tpl b/acptemplates/languageList.tpl deleted file mode 100644 index eab0115782..0000000000 --- a/acptemplates/languageList.tpl +++ /dev/null @@ -1,143 +0,0 @@ -{include file='header' pageTitle='wcf.acp.language.list'} - - - -
-
-

{lang}wcf.acp.language.list{/lang}

-
-
- -
- {pages print=true assign=pagesLinks controller='LanguageList' link="pageNo=%d&sortField=$sortField&sortOrder=$sortOrder"} - - {hascontent} - - {/hascontent} -
- -{if $objects|count} -
-
-

{lang}wcf.acp.language.list{/lang} {#$items}

-
- - - - - - - - - - - - - - {foreach from=$objects item=language} - - - - - - - - - {/foreach} - -
{lang}wcf.global.objectID{/lang}{if $sortField == 'languageID'} {/if}{lang}wcf.acp.language.name{/lang}{if $sortField == 'languageName'} {/if}{lang}wcf.acp.language.users{/lang}{if $sortField == 'users'} {/if}{lang}wcf.acp.language.variables{/lang}{if $sortField == 'variables'} {/if}{lang}wcf.acp.language.customVariables{/lang}{if $sortField == 'customVariables'} {/if}
- {if $__wcf->getSession()->getPermission('admin.language.canEditLanguage')} - - {else} - - {/if} - - {if $__wcf->getSession()->getPermission('admin.language.canEditLanguage')} - {if !$language->isDefault} - - {else} - - {/if} - {else} - - {/if} - - {if $__wcf->getSession()->getPermission('admin.language.canEditLanguage')} - - {else} - - {/if} - {if $__wcf->getSession()->getPermission('admin.language.canDeleteLanguage')} - {if !$language->isDefault} - - {else} - - {/if} - {else} - - {/if} - {@$language->languageID} - {if $__wcf->getSession()->getPermission('admin.language.canEditLanguage')} - {$language->languageName} ({@$language->languageCode}) - {else} - {$language->languageName} ({@$language->languageCode}) - {/if} - {#$language->users}{#$language->variables}{if $language->customVariables > 0 && $__wcf->getSession()->getPermission('admin.language.canEditLanguage')}{#$language->customVariables}{else}{#$language->customVariables}{/if}
-
- -
- {@$pagesLinks} - - {hascontent} - - {/hascontent} -
-{/if} - -{include file='footer'} diff --git a/acptemplates/languageMultilingualism.tpl b/acptemplates/languageMultilingualism.tpl deleted file mode 100644 index 1dc94b15a0..0000000000 --- a/acptemplates/languageMultilingualism.tpl +++ /dev/null @@ -1,55 +0,0 @@ -{include file='header' pageTitle='wcf.acp.language.multilingualism'} - - - -
-
-

{lang}wcf.acp.language.multilingualism{/lang}

-
-
- -{if $errorField} -

{lang}wcf.global.form.error{/lang}

-{/if} - -{if $success|isset} -

{lang}wcf.acp.language.multilingualism.success{/lang}

-{/if} - -
-
-
- - {lang}wcf.acp.language.multilingualism.enable.description{/lang} - -
-
-
- {htmlCheckboxes options=$languages name=languageIDs selected=$languageIDs disableEncoding=true} - - {if $errorField == 'languageIDs'} - - {lang}wcf.acp.language.multilingualism.languages.error.{@$errorType}{/lang} - - {/if} -
-
- - {event name='additionalFields'} -
-
- -
- -
-
- -{include file='footer'} diff --git a/acptemplates/languageServerAdd.tpl b/acptemplates/languageServerAdd.tpl deleted file mode 100644 index b90a029ca7..0000000000 --- a/acptemplates/languageServerAdd.tpl +++ /dev/null @@ -1,59 +0,0 @@ -{include file='header' pageTitle='wcf.acp.languageServer.'|concat:$action} - -
-
-

{lang}wcf.acp.languageServer.{$action}{/lang}

-
-
- -{if $errorField} -

{lang}wcf.global.form.error{/lang}

-{/if} - -{if $success|isset} -

{lang}wcf.acp.languageServer.{$action}.success{/lang}

-{/if} - -{hascontent} -
- -
-{/hascontent} - -
-
-
- {lang}wcf.acp.languageServer.data{/lang} - - -
-
- - {if $errorField == 'server'} - - {if $errorType == 'empty'}{lang}wcf.global.error.empty{/lang}{/if} - {if $errorType == 'notValid'}{lang}wcf.acp.languageServer.server.error.notValid{/lang}{/if} - - {/if} - {lang}wcf.acp.languageServer.server.description{/lang} -
- -
-
- -
- -
-
- -{include file='footer'} diff --git a/acptemplates/languageServerList.tpl b/acptemplates/languageServerList.tpl deleted file mode 100644 index b4861e18d4..0000000000 --- a/acptemplates/languageServerList.tpl +++ /dev/null @@ -1,106 +0,0 @@ -{include file='header' pageTitle='wcf.acp.languageServer.list'} - - - -
-
-

{lang}wcf.acp.languageServer.list{/lang}

-
-
- -
- {pages print=true assign=pagesLinks controller='LanguageServerList' link="pageNo=%d&sortField=$sortField&sortOrder=$sortOrder"} - - {hascontent} - - {/hascontent} -
- -{if !$languageServers|count} -

{lang}wcf.acp.languageServer.view.noneAvailable{/lang}

-{else} -
-
-

{lang}wcf.acp.languageServer.list{/lang} {#$items}

-
- - - - - - - - - - {foreach from=$languageServers item=languageServer} - - - - - - {/foreach} - -
{lang}wcf.global.objectID{/lang}{if $sortField == 'languageServerID'} {/if}{lang}wcf.acp.languageServer.serverURL{/lang}{if $sortField == 'serverURL'} {/if}
- {if $__wcf->getSession()->getPermission('admin.language.canEditServer')} - - - {else} - - - {/if} - - {if $__wcf->getSession()->getPermission('admin.language.canDeleteServer')} - - {else} - - {/if} - {@$languageServer->languageServerID} - {if $__wcf->getSession()->getPermission('admin.language.canEditServer')} - {@$languageServer->serverURL} - {else} - {@$languageServer->serverURL} - {/if} -
-
- -
- {@$pagesLinks} - - {hascontent} - - {/hascontent} -
-{/if} - -{include file='footer'} diff --git a/files/lib/acp/form/LanguageAddForm.class.php b/files/lib/acp/form/LanguageAddForm.class.php deleted file mode 100644 index 09da6feffd..0000000000 --- a/files/lib/acp/form/LanguageAddForm.class.php +++ /dev/null @@ -1,217 +0,0 @@ - - * @package com.woltlab.wcf.acp.language - * @subpackage acp.form - * @category Community Framework - */ -class LanguageAddForm extends AbstractForm { - /** - * @see wcf\page\AbstractPage::$activeMenuItem - */ - public $activeMenuItem = 'wcf.acp.menu.link.language.add'; - - /** - * file name - * @var string - */ - public $filename = ''; - - /** - * import field - * @var string - */ - public $importField = 'languageFile'; - - /** - * language object - * @var wcf\data\language\Language - */ - public $language = null; - - /** - * language code - * @var string - */ - public $languageCode = ''; - - /** - * import language file - * @var string - */ - public $languageFile = ''; - - /** - * list of available languages - * @var array - */ - public $languages = array(); - - /** - * mode - * @var string - */ - public $mode = 'import'; - - /** - * @see wcf\page\AbstractPage::$neededPermissions - */ - public $neededPermissions = array('admin.language.canAddLanguage'); - - /** - * source language object - * @var wcf\data\language\Language - */ - public $sourceLanguage = null; - - /** - * source language id - * @var integer - */ - public $sourceLanguageID = 0; - - /** - * @see wcf\form\Form::readFormParameters() - */ - public function readFormParameters() { - parent::readFormParameters(); - - // mode - if (isset($_POST['mode'])) $this->mode = $_POST['mode']; - - // copy - if (isset($_POST['languageCode'])) $this->languageCode = $_POST['languageCode']; - if (isset($_POST['sourceLanguageID'])) $this->sourceLanguageID = intval($_POST['sourceLanguageID']); - - // import - if (isset($_POST['languageFile']) && !empty($_POST['languageFile'])) { - $this->languageFile = $_POST['languageFile']; - $this->filename = $_POST['languageFile']; - } - if (isset($_FILES['languageUpload']) && !empty($_FILES['languageUpload']['tmp_name'])) { - $this->importField = 'languageUpload'; - $this->filename = $_FILES['languageUpload']['tmp_name']; - } - } - - /** - * @see wcf\form\Form::validate() - */ - public function validate() { - parent::validate(); - - if ($this->mode == 'copy') { - // language code - if (empty($this->languageCode)) { - throw new UserInputException('languageCode'); - } - - // - if (LanguageFactory::getInstance()->getLanguageByCode($this->languageCode)) { - throw new UserInputException('languageCode', 'notUnique'); - } - - // source language id - if (empty($this->sourceLanguageID)) { - throw new UserInputException('sourceLanguageID'); - } - - // get language - $this->sourceLanguage = LanguageFactory::getInstance()->getLanguage($this->sourceLanguageID); - if (!$this->sourceLanguage->languageID) { - throw new UserInputException('sourceLanguageID'); - } - } - else { - // check file - if (!file_exists($this->filename)) { - throw new UserInputException('languageFile'); - } - - // try to import - try { - // open xml document - $xml = new XML(); - $xml->load($this->filename); - - // import xml document - $this->language = LanguageEditor::importFromXML($xml, PACKAGE_ID); - } - catch (SystemException $e) { - throw new UserInputException($this->importField, $e->getMessage()); - } - } - } - - /** - * @see wcf\form\Form::save() - */ - public function save() { - parent::save(); - - if ($this->mode == 'copy') { - $this->language = LanguageEditor::create(array( - 'languageCode' => StringUtil::toLowerCase($this->languageCode) - )); - $languageEditor = new LanguageEditor($this->sourceLanguage); - $languageEditor->copy($this->language); - } - - LanguageFactory::getInstance()->clearCache(); - LanguageFactory::getInstance()->deleteLanguageCache(); - - $this->saved(); - - // show success message - WCF::getTPL()->assign('success', true); - } - - /** - * @see wcf\page\Page::readData() - */ - public function readData() { - parent::readData(); - - $this->languages = LanguageFactory::getInstance()->getLanguages(); - } - - /** - * @see wcf\page\Page::assignVariables() - */ - public function assignVariables() { - parent::assignVariables(); - - WCF::getTPL()->assign(array( - 'mode' => $this->mode, - 'languageCode' => $this->languageCode, - 'sourceLanguageID' => $this->sourceLanguageID, - 'languages' => $this->languages, - 'languageFile' => $this->languageFile - )); - } - - /** - * @see wcf\page\Page::show() - */ - public function show() { - // check master password - WCFACP::checkMasterPassword(); - - parent::show(); - } -} diff --git a/files/lib/acp/form/LanguageExportForm.class.php b/files/lib/acp/form/LanguageExportForm.class.php deleted file mode 100644 index b4a0321837..0000000000 --- a/files/lib/acp/form/LanguageExportForm.class.php +++ /dev/null @@ -1,156 +0,0 @@ - - * @package com.woltlab.wcf.acp.language - * @subpackage acp.form - * @category Community Framework - */ -class LanguageExportForm extends AbstractForm { - /** - * @see wcf\page\AbstractPage::$activeMenuItem - */ - public $activeMenuItem = 'wcf.acp.menu.link.language'; - - /** - * @see wcf\page\AbstractPage::$neededPermissions - */ - public $neededPermissions = array('admin.language.canEditLanguage'); - - /** - * language id - * @var integer - */ - public $languageID = 0; - - /** - * language editor object - * @var wcf\data\language\LanguageEditor - */ - public $language = null; - - /** - * selected packages - * @var array - */ - public $selectedPackages = array(); - - /** - * available packages - * @var array - */ - public $packages = array(); - - /** - * true to export custom variables - * @var boolean - */ - public $exportCustomValues = false; - - /** - * max package name length - * @var integer - */ - public $packageNameLength = 0; - - /** - * @see wcf\page\IPage::readParameters() - */ - public function readParameters() { - parent::readParameters(); - - // get language editor object - if (isset($_REQUEST['id'])) $this->languageID = intval($_REQUEST['id']); - $language = LanguageFactory::getInstance()->getLanguage($this->languageID); - if ($language === null) { - throw new IllegalLinkException(); - } - $this->language = new LanguageEditor($language); - } - - /** - * @see wcf\form\IForm::readFormParameters() - */ - public function readFormParameters() { - parent::readFormParameters(); - - if (isset($_POST['selectedPackages']) && is_array($_POST['selectedPackages'])) { - $selectedPackages = ArrayUtil::toIntegerArray($_POST['selectedPackages']); - $this->selectedPackages = array_combine($selectedPackages, $selectedPackages); - if (isset($this->selectedPackages[0])) unset($this->selectedPackages[0]); - } - - if (isset($_POST['exportCustomValues'])) { - $this->exportCustomValues = intval($_POST['exportCustomValues']); - } - } - - /** - * @see wcf\page\IPage::readData() - */ - public function readData() { - parent::readData(); - - $this->readPackages(); - } - - /** - * @see wcf\form\IForm::save() - */ - public function save() { - parent::save(); - - // send headers - header('Content-Type: text/xml; charset=UTF-8'); - header('Content-Disposition: attachment; filename="'.$this->language->languageCode.'.xml"'); - $this->language->export($this->selectedPackages, $this->exportCustomValues); - exit; - } - - /** - * @see wcf\page\IPage::assignVariables() - */ - public function assignVariables() { - parent::assignVariables(); - - WCF::getTPL()->assign(array( - 'languageID' => $this->languageID, - 'languages' => LanguageFactory::getInstance()->getLanguages(), - 'selectedPackages' => $this->selectedPackages, - 'packages' => $this->packages, - 'selectAllPackages' => true, - 'packageNameLength' => $this->packageNameLength - )); - } - - /** - * Read available packages. - */ - protected function readPackages() { - $sql = "SELECT * - FROM wcf".WCF_N."_package - ORDER BY packageName"; - $statement = WCF::getDB()->prepareStatement($sql); - $statement->execute(array($this->languageID)); - while ($row = $statement->fetchArray()) { - $row['packageNameLength'] = StringUtil::length(WCF::getLanguage()->get($row['packageName'])); - $this->packages[] = new Package(null, $row); - if ($row['packageNameLength'] > $this->packageNameLength) { - $this->packageNameLength = $row['packageNameLength']; - } - } - } -} diff --git a/files/lib/acp/form/LanguageMultilingualismForm.class.php b/files/lib/acp/form/LanguageMultilingualismForm.class.php deleted file mode 100644 index dc14dff7f8..0000000000 --- a/files/lib/acp/form/LanguageMultilingualismForm.class.php +++ /dev/null @@ -1,153 +0,0 @@ - - * @package com.woltlab.wcf.acp.language - * @subpackage acp.form - * @category Community Framework - */ -class LanguageMultilingualismForm extends AbstractForm { - /** - * @see wcf\page\AbstractPage::$activeMenuItem - */ - public $activeMenuItem = 'wcf.acp.menu.link.language.multilingualism'; - - /** - * @see wcf\page\AbstractPage::$neededPermissions - */ - public $neededPermissions = array('admin.language.canEditLanguage'); - - // data - // todo: comment - public $enable = 0; - public $languageIDs = array(); - public $languages = array(); - public $languageList = array(); - - /** - * @see wcf\page\IPage::readParameters() - */ - public function readParameters() { - parent::readParameters(); - - $this->languages = LanguageFactory::getInstance()->getLanguages(); - } - - /** - * @see wcf\form\IForm::readFormParameters() - */ - public function readFormParameters() { - parent::readFormParameters(); - - if (isset($_POST['enable'])) $this->enable = intval($_POST['enable']); - if (isset($_POST['languageIDs']) && is_array($_POST['languageIDs'])) $this->languageIDs = ArrayUtil::toIntegerArray($_POST['languageIDs']); - } - - /** - * @see wcf\form\IForm::validate() - */ - public function validate() { - parent::validate(); - - if ($this->enable == 1) { - // add default language - if (!in_array(LanguageFactory::getInstance()->getDefaultLanguageID(), $this->languageIDs)) { - $this->languageIDs[] = LanguageFactory::getInstance()->getDefaultLanguageID(); - } - - // validate language ids - $contentLanguages = 0; - foreach ($this->languageIDs as $languageID) { - if (isset($this->languages[$languageID])) { - $contentLanguages++; - } - } - - if ($contentLanguages < 2) { - throw new UserInputException('languageIDs'); - } - } - } - - /** - * @see wcf\form\IForm::save() - */ - public function save() { - parent::save(); - - // save - LanguageEditor::enableMultilingualism(($this->enable == 1 ? $this->languageIDs : array())); - - // clear cache - CacheHandler::getInstance()->clear(WCF_DIR.'cache/', 'cache.language.php'); - $this->saved(); - - // show success message - WCF::getTPL()->assign('success', true); - } - - /** - * @see wcf\page\IPage::readData() - */ - public function readData() { - parent::readData(); - - if (empty($_POST)) { - // default values - $contentLanguages = 0; - foreach ($this->languages as $languageID => $language) { - if ($language->hasContent) { - $contentLanguages++; - $this->languageIDs[] = $languageID; - } - } - - // add default language - if (!in_array(LanguageFactory::getInstance()->getDefaultLanguageID(), $this->languageIDs)) { - $this->languageIDs[] = LanguageFactory::getInstance()->getDefaultLanguageID(); - } - - if ($contentLanguages > 1) { - $this->enable = 1; - } - } - - $this->languageList = LanguageFactory::getInstance()->getLanguages(); - } - - /** - * @see wcf\page\IPage::assignVariables() - */ - public function assignVariables() { - parent::assignVariables(); - - WCF::getTPL()->assign(array( - 'enable' => $this->enable, - 'languageIDs' => $this->languageIDs, - 'languages' => $this->languageList - )); - } - - /** - * @see wcf\page\IPage::show() - */ - public function show() { - // check master password - WCFACP::checkMasterPassword(); - - parent::show(); - } -} diff --git a/files/lib/acp/form/LanguageServerAddForm.class.php b/files/lib/acp/form/LanguageServerAddForm.class.php deleted file mode 100644 index cdc6dc70df..0000000000 --- a/files/lib/acp/form/LanguageServerAddForm.class.php +++ /dev/null @@ -1,103 +0,0 @@ - - * @package com.woltlab.wcf - * @subpackage acp.form - * @category Community Framework - */ -class LanguageServerAddForm extends AbstractForm { - /** - * @see wcf\page\AbstractPage::$activeMenuItem - */ - public $activeMenuItem = 'wcf.acp.menu.link.language.server.add'; - - /** - * @see wcf\page\AbstractPage::$neededPermissions - */ - public $neededPermissions = array('admin.language.canAddServer'); - - /** - * server url - * @var string - */ - public $server = ''; - - /** - * @see wcf\form\IForm::readFormParameters() - */ - public function readFormParameters() { - parent::readFormParameters(); - - if (isset($_POST['server'])) $this->server = StringUtil::trim($_POST['server']); - } - - /** - * @see wcf\form\IForm::validate() - */ - public function validate() { - parent::validate(); - - if (empty($this->server)) { - throw new UserInputException('server'); - } - - if (!PackageUpdateServer::isValidServerURL($this->server)) { - throw new UserInputException('server', 'notValid'); - } - } - - /** - * @see wcf\form\IForm::save() - */ - public function save() { - parent::save(); - - // save server - $this->objectAction = new LanguageServerAction(array(), 'create', array('data' => array( - 'serverURL' => $this->server - ))); - $this->objectAction->executeAction(); - $this->saved(); - - // reset values - $this->server = ''; - - // show success message - WCF::getTPL()->assign('success', true); - } - - /** - * @see wcf\page\IPage::assignVariables() - */ - public function assignVariables() { - parent::assignVariables(); - - WCF::getTPL()->assign(array( - 'server' => $this->server, - 'action' => 'add' - )); - } - - /** - * @see wcf\page\IPage::assignVariables() - */ - public function show() { - // check master password - WCFACP::checkMasterPassword(); - - parent::show(); - } -} diff --git a/files/lib/acp/form/LanguageServerEditForm.class.php b/files/lib/acp/form/LanguageServerEditForm.class.php deleted file mode 100644 index 9f9698977a..0000000000 --- a/files/lib/acp/form/LanguageServerEditForm.class.php +++ /dev/null @@ -1,95 +0,0 @@ - - * @package com.woltlab.wcf - * @subpackage acp.form - * @category Community Framework - */ -class LanguageServerEditForm extends LanguageServerAddForm { - /** - * @see wcf\page\AbstractPage::$activeMenuItem - */ - public $activeMenuItem = 'wcf.acp.menu.link.language.server'; - - /** - * @see wcf\page\AbstractPage::$neededPermissions - */ - public $neededPermissions = array('admin.language.canAddServer'); - - /** - * language server id - * @var integer - */ - public $languageServerID = 0; - - /** - * active language server - * @var wcf\data\language\server\LanguageServer - */ - public $languageServer = null; - - /** - * @see wcf\page\IPage::readParameters() - */ - public function readParameters() { - parent::readParameters(); - - if (isset($_REQUEST['id'])) $this->languageServerID = intval($_REQUEST['id']); - $this->languageServer = new LanguageServer($this->languageServerID); - if (!$this->languageServer->languageServerID) { - throw new IllegalLinkException(); - } - } - - /** - * @see wcf\form\IForm::save() - */ - public function save() { - AbstractForm::save(); - - // save server - $this->objectAction = new LanguageServerAction(array($this->languageServerID), 'update', array('data' => array( - 'serverURL' => $this->server - ))); - $this->objectAction->executeAction(); - $this->saved(); - - // show success message - WCF::getTPL()->assign('success', true); - } - - /** - * @see wcf\page\IPage::readData() - */ - public function readData() { - parent::readData(); - - if (empty($_POST)) { - $this->server = $this->languageServer->serverURL; - } - } - - /** - * @see wcf\page\IPage::assignVariables() - */ - public function assignVariables() { - parent::assignVariables(); - - WCF::getTPL()->assign(array( - 'languageServerID' => $this->languageServerID, - 'languageServer' => $this->languageServer, - 'action' => 'edit' - )); - } -} diff --git a/files/lib/acp/page/LanguageListPage.class.php b/files/lib/acp/page/LanguageListPage.class.php deleted file mode 100644 index c475fd4925..0000000000 --- a/files/lib/acp/page/LanguageListPage.class.php +++ /dev/null @@ -1,70 +0,0 @@ - - * @package com.woltlab.wcf.acp.language - * @subpackage acp.page - * @category Community Framework - */ -class LanguageListPage extends SortablePage { - /** - * @see wcf\page\AbstractPage::$neededPermissions - */ - public $neededPermissions = array('admin.language.canEditLanguage', 'admin.language.canDeleteLanguage'); - - /** - * @see wcf\page\SortablePage::$defaultSortField - */ - public $defaultSortField = 'languageName'; - - /** - * @see wcf\page\SortablePage::$validSortFields - */ - public $validSortFields = array('languageID', 'languageCode', 'languageName', 'users', 'variables', 'customVariables'); - - /** - * @see wcf\page\MultipleLinkPage::$objectListClassName - */ - public $objectListClassName = 'wcf\data\language\LanguageList'; - - /** - * @see wcf\page\MultipleLinkPage::initObjectList() - */ - public function initObjectList() { - parent::initObjectList(); - - $this->objectList->sqlSelects = "(SELECT COUNT(*) FROM wcf".WCF_N."_user user WHERE languageID = language.languageID) AS users,"; - $this->objectList->sqlSelects .= "(SELECT COUNT(*) FROM wcf".WCF_N."_language_item WHERE languageID = language.languageID) AS variables,"; - $this->objectList->sqlSelects .= "(SELECT COUNT(*) FROM wcf".WCF_N."_language_item WHERE languageID = language.languageID AND languageCustomItemValue <> NULL) AS customVariables"; - $this->sqlOrderBy = "cronjob.".$this->sortField." ".$this->sortOrder; - } - - /** - * @see wcf\page\IPage::assignVariables() - */ - public function assignVariables() { - parent::assignVariables(); - - WCF::getTPL()->assign(array( - 'languages' => $this->objectList->getObjects() - )); - } - - /** - * @see wcf\page\IPage::show() - */ - public function show() { - // set active menu item - ACPMenu::getInstance()->setActiveMenuItem('wcf.acp.menu.link.language.list'); - - parent::show(); - } -} diff --git a/files/lib/acp/page/LanguageServerListPage.class.php b/files/lib/acp/page/LanguageServerListPage.class.php deleted file mode 100644 index ff6248710e..0000000000 --- a/files/lib/acp/page/LanguageServerListPage.class.php +++ /dev/null @@ -1,58 +0,0 @@ - - * @package com.woltlab.wcf - * @subpackage acp.page - * @category Community Framework - */ -class LanguageServerListPage extends SortablePage { - /** - * @see wcf\page\AbstractPage::$neededPermissions - */ - public $neededPermissions = array('admin.language.canEditServer', 'admin.language.canDeleteServer'); - - /** - * @see wcf\page\SortablePage::$defaultSortField - */ - public $defaultSortField = 'serverURL'; - - /** - * @see wcf\page\SortablePage::$validSortFields - */ - public $validSortFields = array('languageServerID', 'serverURL'); - - /** - * @see wcf\page\MultipleLinkPage::$objectListClassName - */ - public $objectListClassName = 'wcf\data\language\server\LanguageServerList'; - - /** - * @see wcf\page\IPage::assignVariables() - */ - public function assignVariables() { - parent::assignVariables(); - - WCF::getTPL()->assign(array( - 'languageServers' => $this->objectList->getObjects() - )); - } - - /** - * @see wcf\page\IPage::show() - */ - public function show() { - // enable menu item - ACPMenu::getInstance()->setActiveMenuItem('wcf.acp.menu.link.language.server.list'); - - parent::show(); - } -} diff --git a/language/de.xml b/language/de.xml index e67437e02e..f5352f0e45 100644 --- a/language/de.xml +++ b/language/de.xml @@ -5,12 +5,6 @@ - - - - - - @@ -99,40 +93,4 @@ - - - - - - - - - - - ISO 639-1 an. Weitere Informationen zu Sprachcodes finden Sie unter http://de.wikipedia.org/wiki/ISO_639-1.]]> - - languageName}“ wirklich löschen?]]> - - - - - - - - - - - - - - - - - - - - - - - diff --git a/package.xml b/package.xml index 56a3a2bfc2..6d2d5883f9 100644 --- a/package.xml +++ b/package.xml @@ -5,14 +5,6 @@ packageDecription cannot be NULL. 1.0.0 Alpha 1 2012-10-08 -======= - - - Language Administration - Comprehensive language manager - 1.0.0 Alpha 1 - 2011-06-30 ->>>>>>> acp.language/master @@ -28,12 +20,7 @@ acptemplates.tar files.tar acpMenu.xml -<<<<<<< HEAD language/*.xml userGroupOption.xml -======= - userGroupOption.xml - language/*.xml ->>>>>>> acp.language/master diff --git a/userGroupOption.xml b/userGroupOption.xml index 35ad57ad35..8719464e19 100644 --- a/userGroupOption.xml +++ b/userGroupOption.xml @@ -25,27 +25,6 @@ 3 - - - - - - -- 2.20.1