<acpmenuitem name="wcf.acp.menu.link.option.importAndExport">
<parent>wcf.acp.menu.link.option.management</parent>
<showorder>1</showorder>
- <controller><![CDATA[OptionImport]]></controller>
+ <controller><![CDATA[wcf\acp\form\OptionImportForm]]></controller>
</acpmenuitem>
<!-- /options -->
$conditions->add("menuItemID IN (?)", array($itemIDs));
// get needed menu items and build item tree
- $sql = "SELECT menu_item.packageID, menuItem, parentMenuItem,
- menuItemLink, permissions, options, packageDir
+ $sql = "SELECT *
FROM wcf".WCF_N."_acp_menu_item menu_item
LEFT JOIN wcf".WCF_N."_package package
ON (package.packageID = menu_item.packageID)
$result = parent::prepareImport($data);
// controller
- $result['menuItemController'] = (isset($data['elements']['controller'])) ? $data['elements']['controller'] : '';
+ $result['menuItemController'] = isset($data['elements']['controller']) ? $data['elements']['controller'] : '';
if (!empty($result['menuItemController'])) {
if (!ClassUtil::isInstanceOf($result['menuItemController'], 'wcf\action\IAction') && !ClassUtil::isInstanceOf($result['menuItemController'], 'wcf\page\IPage')) {
throw new SystemException("Menu item controller '".$result['menuItemController']."' is not a valid page controller");
}
}
- // validate controller and link (cannot be empty at the same time)
- if (empty($result['menuItemLink']) && empty($result['menuItemController'])) {
- throw new SystemException("Menu item '".$result['menuItem']."' neither has a link nor a controller given");
- }
-
return $result;
}
}