From: Alexander Ebert Date: Fri, 30 Sep 2011 14:52:22 +0000 (+0200) Subject: Hopefully fixed deletion of PIP items X-Git-Tag: 2.0.0_Beta_1~1744^2 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=0345f8122e2eac999a218d5743d3e0c0ce9226c4;p=GitHub%2FWoltLab%2FWCF.git Hopefully fixed deletion of PIP items Fixes #160 --- diff --git a/wcfsetup/install/files/lib/system/package/plugin/AbstractXMLPackageInstallationPlugin.class.php b/wcfsetup/install/files/lib/system/package/plugin/AbstractXMLPackageInstallationPlugin.class.php index c0e2df7062..dd3a27868d 100644 --- a/wcfsetup/install/files/lib/system/package/plugin/AbstractXMLPackageInstallationPlugin.class.php +++ b/wcfsetup/install/files/lib/system/package/plugin/AbstractXMLPackageInstallationPlugin.class.php @@ -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; }