Added menuItemController for *Menu-PIPs
authorAlexander Ebert <ebert@woltlab.com>
Thu, 3 Jan 2013 17:45:08 +0000 (18:45 +0100)
committerAlexander Ebert <ebert@woltlab.com>
Thu, 3 Jan 2013 17:45:08 +0000 (18:45 +0100)
wcfsetup/install/files/lib/system/package/plugin/ACPMenuPackageInstallationPlugin.class.php
wcfsetup/install/files/lib/system/package/plugin/AbstractMenuPackageInstallationPlugin.class.php
wcfsetup/install/files/lib/system/package/plugin/PageMenuPackageInstallationPlugin.class.php

index 23c677d03cb14e96aea85eced39d0a3eccff8805..f10f11ede6d7d36a9f796c576c76653005c93e12 100644 (file)
@@ -5,7 +5,7 @@ namespace wcf\system\package\plugin;
  * Installs, updates and deletes ACP menu items.
  * 
  * @author     Alexander Ebert
- * @copyright  2001-2012 WoltLab GmbH
+ * @copyright  2001-2013 WoltLab GmbH
  * @license    GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
  * @package    com.woltlab.wcf
  * @subpackage system.package.plugin
@@ -16,16 +16,4 @@ class ACPMenuPackageInstallationPlugin extends AbstractMenuPackageInstallationPl
         * @see wcf\system\package\plugin\AbstractXMLPackageInstallationPlugin::$className
         */
        public $className = 'wcf\data\acp\menu\item\ACPMenuItemEditor';
-       
-       /**
-        * @see wcf\system\package\plugin\AbstractXMLPackageInstallationPlugin::prepareImport()
-        */
-       protected function prepareImport(array $data) {
-               $result = parent::prepareImport($data);
-               
-               // controller
-               $result['menuItemController'] = isset($data['elements']['controller']) ? $data['elements']['controller'] : '';
-               
-               return $result;
-       }
 }
index fa785a4d7fb60d715e907d0823717dd68f000f7d..99dbf0a7e033b2bf7fd7f10e15c250f3b2ea914b 100644 (file)
@@ -42,6 +42,7 @@ abstract class AbstractMenuPackageInstallationPlugin extends AbstractXMLPackageI
                // merge values and default values
                return array(
                        'menuItem' => $data['attributes']['name'],
+                       'menuItemController' => isset($data['elements']['controller']) ? $data['elements']['controller'] : '',
                        'menuItemLink' => (isset($data['elements']['link'])) ? $data['elements']['link'] : '',
                        'options' => (isset($data['elements']['options'])) ? $data['elements']['options'] : '',
                        'parentMenuItem' => (isset($data['elements']['parent'])) ? $data['elements']['parent'] : '',
index a78b77ff6da63412819b5490705695f6c9ef6417..f3b9cac00ed78c2235740ec5f18f10b57553ae21 100644 (file)
@@ -28,9 +28,6 @@ class PageMenuPackageInstallationPlugin extends AbstractMenuPackageInstallationP
                // position
                $result['menuPosition'] = (!empty($data['elements']['position']) && $data['elements']['position'] == 'footer') ? 'footer' : 'header';
                
-               // controller
-               $result['menuItemController'] = (isset($data['elements']['controller'])) ? $data['elements']['controller'] : '';
-               
                // class name
                if (!empty($data['elements']['classname'])) {
                        $result['className'] = $data['elements']['classname'];