Hopefully fixed deletion of PIP items
authorAlexander Ebert <ebert@woltlab.com>
Fri, 30 Sep 2011 14:52:22 +0000 (16:52 +0200)
committerAlexander Ebert <ebert@woltlab.com>
Fri, 30 Sep 2011 14:52:22 +0000 (16:52 +0200)
Fixes #160

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

index c0e2df706266e179f9b2c6fd5fe4be7d022c3c35..dd3a27868d1fcbeca4d268dc1a2a5b540273719e 100644 (file)
@@ -62,6 +62,7 @@ abstract class AbstractXMLPackageInstallationPlugin extends AbstractPackageInsta
                foreach ($elements as $element) {
                        $data = array(
                                'attributes' => array(),
+                               'elements' => array(),
                                'value' => $element->nodeValue
                        );
                        
@@ -71,6 +72,12 @@ abstract class AbstractXMLPackageInstallationPlugin extends AbstractPackageInsta
                                $data['attributes'][$attribute->name] = $attribute->value;
                        }
                        
+                       // get child elements
+                       $childNodes = $xpath->query('child::*', $element);
+                       foreach ($childNodes as $childNode) {
+                               $data['elements'][$childNode->name] = $childNode->value;
+                       }
+                       
                        $items[] = $data;
                }