Fixed box editor PIP
authorAlexander Ebert <ebert@woltlab.com>
Thu, 1 Jun 2017 10:36:51 +0000 (12:36 +0200)
committerAlexander Ebert <ebert@woltlab.com>
Thu, 1 Jun 2017 10:36:51 +0000 (12:36 +0200)
Closes #2280

wcfsetup/install/files/lib/system/package/plugin/BoxPackageInstallationPlugin.class.php

index 6a43c9f2b9146e2eff09ad58d98404cc9ed99d6f..dc2aaeb64ca9b8b54e0d0a6d08da55bb8fa96e24 100644 (file)
@@ -24,7 +24,7 @@ class BoxPackageInstallationPlugin extends AbstractXMLPackageInstallationPlugin
        
        /**
         * list of created or updated boxes by id
-        * @var Box[]
+        * @var BoxEditor[]
         */
        protected $boxes = [];
        
@@ -291,7 +291,7 @@ class BoxPackageInstallationPlugin extends AbstractXMLPackageInstallationPlugin
                
                // store content for later import
                $this->content[$box->boxID] = $content;
-               $this->boxes[$box->boxID] = $box;
+               $this->boxes[$box->boxID] = ($box instanceof Box) ? new BoxEditor($box) : $box;
                
                return $box;
        }
@@ -314,7 +314,7 @@ class BoxPackageInstallationPlugin extends AbstractXMLPackageInstallationPlugin
                        
                        WCF::getDB()->beginTransaction();
                        foreach ($this->content as $boxID => $contentData) {
-                               $boxEditor = new BoxEditor($this->boxes[$boxID]);
+                               $boxEditor = $this->boxes[$boxID];
                                
                                foreach ($contentData as $languageCode => $content) {
                                        $languageID = null;