From: Matthias Schmidt Date: Wed, 9 Oct 2013 15:42:49 +0000 (+0200) Subject: Uses AbstractPage::$activeMenuItem in user (group)-related forms X-Git-Tag: 2.0.0_Beta_11~34^2~3^2~5 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=906091f50b5bbe2c5a5a607fdd6aa2ccb192c0b1;p=GitHub%2FWoltLab%2FWCF.git Uses AbstractPage::$activeMenuItem in user (group)-related forms --- diff --git a/wcfsetup/install/files/lib/acp/form/UserAddForm.class.php b/wcfsetup/install/files/lib/acp/form/UserAddForm.class.php index 0856845895..66dd96ed1f 100644 --- a/wcfsetup/install/files/lib/acp/form/UserAddForm.class.php +++ b/wcfsetup/install/files/lib/acp/form/UserAddForm.class.php @@ -8,7 +8,6 @@ use wcf\form\AbstractForm; use wcf\system\database\util\PreparedStatementConditionBuilder; use wcf\system\exception\UserInputException; use wcf\system\language\LanguageFactory; -use wcf\system\menu\acp\ACPMenu; use wcf\system\WCF; use wcf\util\ArrayUtil; use wcf\util\StringUtil; @@ -26,15 +25,14 @@ use wcf\util\UserUtil; */ class UserAddForm extends UserOptionListForm { /** - * @see wcf\page\AbstractPage::$neededPermissions + * @see wcf\page\AbstractPage::$activeMenuItem */ - public $neededPermissions = array('admin.user.canAddUser'); + public $activeMenuItem = 'wcf.acp.menu.link.user.add'; /** - * name of the active menu item - * @var string + * @see wcf\page\AbstractPage::$neededPermissions */ - public $menuItemName = 'wcf.acp.menu.link.user.add'; + public $neededPermissions = array('admin.user.canAddUser'); /** * username @@ -407,9 +405,6 @@ class UserAddForm extends UserOptionListForm { * @see wcf\page\IPage::show() */ public function show() { - // set active menu item - ACPMenu::getInstance()->setActiveMenuItem($this->menuItemName); - // get the default language id $this->languageID = $this->getDefaultFormLanguageID(); diff --git a/wcfsetup/install/files/lib/acp/form/UserEditForm.class.php b/wcfsetup/install/files/lib/acp/form/UserEditForm.class.php index 35c8233320..f1b4ce2834 100755 --- a/wcfsetup/install/files/lib/acp/form/UserEditForm.class.php +++ b/wcfsetup/install/files/lib/acp/form/UserEditForm.class.php @@ -28,9 +28,9 @@ use wcf\util\StringUtil; */ class UserEditForm extends UserAddForm { /** - * @see wcf\acp\form\UserAddForm::$menuItemName + * @see wcf\page\AbstractPage::$activeMenuItem */ - public $menuItemName = 'wcf.acp.menu.link.user.management'; + public $activeMenuItem = 'wcf.acp.menu.link.user.management'; /** * @see wcf\page\AbstractPage::$neededPermissions diff --git a/wcfsetup/install/files/lib/acp/form/UserGroupAddForm.class.php b/wcfsetup/install/files/lib/acp/form/UserGroupAddForm.class.php index d3a0ba5aea..585f4cec76 100755 --- a/wcfsetup/install/files/lib/acp/form/UserGroupAddForm.class.php +++ b/wcfsetup/install/files/lib/acp/form/UserGroupAddForm.class.php @@ -5,7 +5,6 @@ use wcf\data\user\group\UserGroupAction; use wcf\data\user\group\UserGroupEditor; use wcf\system\exception\UserInputException; use wcf\system\language\I18nHandler; -use wcf\system\menu\acp\ACPMenu; use wcf\system\WCF; use wcf\system\WCFACP; use wcf\util\StringUtil; @@ -22,15 +21,14 @@ use wcf\util\StringUtil; */ class UserGroupAddForm extends AbstractOptionListForm { /** - * @see wcf\page\AbstractPage::$neededPermissions + * @see wcf\page\AbstractPage::$activeMenuItem */ - public $neededPermissions = array('admin.user.canAddGroup'); + public $activeMenuItem = 'wcf.acp.menu.link.group.add'; /** - * name of the active acp menu item - * @var string + * @see wcf\page\AbstractPage::$neededPermissions */ - public $menuItemName = 'wcf.acp.menu.link.group.add'; + public $neededPermissions = array('admin.user.canAddGroup'); /** * option tree @@ -231,9 +229,6 @@ class UserGroupAddForm extends AbstractOptionListForm { * @see wcf\form\IForm::show() */ public function show() { - // set active menu item - ACPMenu::getInstance()->setActiveMenuItem($this->menuItemName); - // check master password WCFACP::checkMasterPassword(); diff --git a/wcfsetup/install/files/lib/acp/form/UserGroupEditForm.class.php b/wcfsetup/install/files/lib/acp/form/UserGroupEditForm.class.php index b2b9cf8fbb..4b484e7fde 100755 --- a/wcfsetup/install/files/lib/acp/form/UserGroupEditForm.class.php +++ b/wcfsetup/install/files/lib/acp/form/UserGroupEditForm.class.php @@ -21,9 +21,9 @@ use wcf\system\WCF; */ class UserGroupEditForm extends UserGroupAddForm { /** - * @see wcf\acp\form\UserGroupAddForm::$menuItemName + * @see wcf\page\AbstractPage::$activeMenuItem */ - public $menuItemName = 'wcf.acp.menu.link.group'; + public $activeMenuItem = 'wcf.acp.menu.link.group'; /** * @see wcf\page\AbstractPage::$neededPermissions diff --git a/wcfsetup/install/files/lib/acp/form/UserSearchForm.class.php b/wcfsetup/install/files/lib/acp/form/UserSearchForm.class.php index 41c4e5efa7..c1dbefb36d 100755 --- a/wcfsetup/install/files/lib/acp/form/UserSearchForm.class.php +++ b/wcfsetup/install/files/lib/acp/form/UserSearchForm.class.php @@ -6,7 +6,6 @@ use wcf\system\database\util\PreparedStatementConditionBuilder; use wcf\system\event\EventHandler; use wcf\system\exception\UserInputException; use wcf\system\language\LanguageFactory; -use wcf\system\menu\acp\ACPMenu; use wcf\system\request\LinkHandler; use wcf\system\wcf; use wcf\util\ArrayUtil; @@ -25,10 +24,9 @@ use wcf\util\StringUtil; */ class UserSearchForm extends UserOptionListForm { /** - * active menu item name - * @var string + * @see wcf\page\AbstractPage::$activeMenuItem */ - public $menuItemName = 'wcf.acp.menu.link.user.search'; + public $activeMenuItem = 'wcf.acp.menu.link.user.search'; /** * @see wcf\page\AbstractPage::$neededPermissions @@ -272,17 +270,6 @@ class UserSearchForm extends UserOptionListForm { )); } - /** - * @see wcf\form\IForm::show() - */ - public function show() { - // set active menu item - ACPMenu::getInstance()->setActiveMenuItem($this->menuItemName); - - // show form - parent::show(); - } - /** * @see wcf\form\IForm::save() */