Fix duplicate tag check when editing
authorTim Düsterhus <timwolla@googlemail.com>
Sun, 5 Jan 2014 13:52:01 +0000 (14:52 +0100)
committerTim Düsterhus <timwolla@googlemail.com>
Sun, 5 Jan 2014 13:52:01 +0000 (14:52 +0100)
See: https://www.woltlab.com/forum/index.php/Thread/219837-Problem-bei-der-TAG-Verwaltung-Integrity-constraint-violation-1062-Duplicate-ent/

wcfsetup/install/files/lib/acp/form/TagEditForm.class.php

index 9dc1a433e7cf577dc080fcbb6f59b992e2d67050..c98db396944032ab9289b6c93f022f19303c4d24 100644 (file)
@@ -109,14 +109,14 @@ class TagEditForm extends TagAddForm {
         * @see \wcf\page\IPage::readData()
         */
        public function readData() {
+               $this->languageID = $this->tagObj->languageID;
+               
                parent::readData();
                
                if (empty($_POST)) {
                        $this->name = $this->tagObj->name;
                }
                
-               $this->languageID = $this->tagObj->languageID;
-               
                $synonymList = new TagList();
                $synonymList->getConditionBuilder()->add('synonymFor = ?', array($this->tagObj->tagID));
                $synonymList->readObjects();