Fix editing of tags
authorTim Düsterhus <timwolla@googlemail.com>
Fri, 6 Dec 2013 22:25:09 +0000 (23:25 +0100)
committerTim Düsterhus <timwolla@googlemail.com>
Fri, 6 Dec 2013 22:25:09 +0000 (23:25 +0100)
wcfsetup/install/files/lib/acp/form/TagAddForm.class.php

index 432420ebc46a63e71aed0eb45ae0791f3a7e018c..0877f91b8214a81b21dc14835e919c9696626f73 100644 (file)
@@ -88,13 +88,15 @@ class TagAddForm extends AbstractForm {
                }
                
                // validate language
-               if (empty($this->availableLanguages)) {
-                       // force default language id
-                       $this->languageID = LanguageFactory::getInstance()->getDefaultLanguageID();
-               }
-               else {
-                       if (!isset($this->availableLanguages[$this->languageID])) {
-                               throw new UserInputException('languageID', 'notFound');
+               if (!isset($this->tagObj)) {
+                       if (empty($this->availableLanguages)) {
+                               // force default language id
+                               $this->languageID = LanguageFactory::getInstance()->getDefaultLanguageID();
+                       }
+                       else {
+                               if (!isset($this->availableLanguages[$this->languageID])) {
+                                       throw new UserInputException('languageID', 'notFound');
+                               }
                        }
                }