From df875a3093505335a74066ed4e1bb4369ba69e0f Mon Sep 17 00:00:00 2001 From: Matthias Schmidt Date: Fri, 4 Jul 2014 22:13:16 +0200 Subject: [PATCH] Add categories for page object types --- com.woltlab.wcf/objectType.xml | 33 +++++++++++++++++++ .../lib/system/page/PageManager.class.php | 18 +++++----- wcfsetup/install/lang/de.xml | 3 ++ wcfsetup/install/lang/en.xml | 3 ++ 4 files changed, 49 insertions(+), 8 deletions(-) diff --git a/com.woltlab.wcf/objectType.xml b/com.woltlab.wcf/objectType.xml index ef5f327891..30c024b26d 100644 --- a/com.woltlab.wcf/objectType.xml +++ b/com.woltlab.wcf/objectType.xml @@ -440,173 +440,206 @@ com.woltlab.wcf.AccountManagementForm com.woltlab.wcf.page + com.woltlab.wcf.user com.woltlab.wcf.AvatarEditForm com.woltlab.wcf.page + com.woltlab.wcf.user com.woltlab.wcf.DisclaimerForm com.woltlab.wcf.page + com.woltlab.wcf.other com.woltlab.wcf.EmailActivationForm com.woltlab.wcf.page + com.woltlab.wcf.user com.woltlab.wcf.EmailNewActivationCodeForm com.woltlab.wcf.page + com.woltlab.wcf.user com.woltlab.wcf.LoginForm com.woltlab.wcf.page + com.woltlab.wcf.user com.woltlab.wcf.LostPasswordForm com.woltlab.wcf.page + com.woltlab.wcf.user com.woltlab.wcf.MailForm com.woltlab.wcf.page + com.woltlab.wcf.user com.woltlab.wcf.ModerationActivationForm com.woltlab.wcf.page + com.woltlab.wcf.moderation com.woltlab.wcf.ModerationReportForm com.woltlab.wcf.page + com.woltlab.wcf.moderation com.woltlab.wcf.NewPasswordForm com.woltlab.wcf.page + com.woltlab.wcf.user com.woltlab.wcf.NotificationSettingsForm com.woltlab.wcf.page + com.woltlab.wcf.user com.woltlab.wcf.RegisterActivationForm com.woltlab.wcf.page + com.woltlab.wcf.user com.woltlab.wcf.RegisterForm com.woltlab.wcf.page + com.woltlab.wcf.user com.woltlab.wcf.RegisterNewActivationCodeForm com.woltlab.wcf.page + com.woltlab.wcf.user com.woltlab.wcf.SearchForm com.woltlab.wcf.page + com.woltlab.wcf.other com.woltlab.wcf.SettingsForm com.woltlab.wcf.page + com.woltlab.wcf.user com.woltlab.wcf.SignatureEditForm com.woltlab.wcf.page module_user_signature + com.woltlab.wcf.user com.woltlab.wcf.UserSearchForm com.woltlab.wcf.page module_members_list + com.woltlab.wcf.other com.woltlab.wcf.DashboardPage com.woltlab.wcf.page module_dashboard_page + com.woltlab.wcf.other com.woltlab.wcf.DeletedContentListPage com.woltlab.wcf.page + com.woltlab.wcf.moderation com.woltlab.wcf.FollowingPage com.woltlab.wcf.page + com.woltlab.wcf.user com.woltlab.wcf.IgnoredUsersPage com.woltlab.wcf.page + com.woltlab.wcf.user com.woltlab.wcf.MembersListPage com.woltlab.wcf.page module_members_list + com.woltlab.wcf.other com.woltlab.wcf.ModerationListPage com.woltlab.wcf.page + com.woltlab.wcf.moderation com.woltlab.wcf.NotificationListPage com.woltlab.wcf.page + com.woltlab.wcf.user com.woltlab.wcf.PrivacyPolicyPage com.woltlab.wcf.page module_privacy_policy_page + com.woltlab.wcf.other com.woltlab.wcf.RecentActivityListPage com.woltlab.wcf.page + com.woltlab.wcf.other com.woltlab.wcf.SearchResultPage com.woltlab.wcf.page + com.woltlab.wcf.other com.woltlab.wcf.TaggedPage com.woltlab.wcf.page module_tagging + com.woltlab.wcf.other com.woltlab.wcf.TeamPage com.woltlab.wcf.page module_team_page + com.woltlab.wcf.other com.woltlab.wcf.UserPage com.woltlab.wcf.page + com.woltlab.wcf.user com.woltlab.wcf.UsersOnlineListPage com.woltlab.wcf.page + com.woltlab.wcf.other diff --git a/wcfsetup/install/files/lib/system/page/PageManager.class.php b/wcfsetup/install/files/lib/system/page/PageManager.class.php index b574244cb4..371000992a 100644 --- a/wcfsetup/install/files/lib/system/page/PageManager.class.php +++ b/wcfsetup/install/files/lib/system/page/PageManager.class.php @@ -1,7 +1,6 @@ objectTypeID] = WCF::getLanguage()->get('wcf.page.'.$objectType->objectType); - - if ($application === null && substr($objectType->className, 0, 3) != 'wcf') { - $classNamePieces = explode('\\', $objectType->className); - - $selection[$objectType->objectTypeID] .= ' ('.PackageCache::getInstance()->getPackage(ApplicationHandler::getInstance()->getApplication($classNamePieces[0])->packageID).')'; + $categoryName = WCF::getLanguage()->get('wcf.page.category.'.$objectType->categoryname); + if (!isset($selection[$categoryName])) { + $selection[$categoryName] = array(); } + + $selection[$categoryName][$objectType->objectTypeID] = WCF::getLanguage()->get('wcf.page.'.$objectType->objectType); } - asort($selection); + ksort($selection); + + foreach ($selection as &$subSelection) { + asort($subSelection); + } return $selection; } diff --git a/wcfsetup/install/lang/de.xml b/wcfsetup/install/lang/de.xml index cdcb1ba1d0..1e7b8a36c9 100644 --- a/wcfsetup/install/lang/de.xml +++ b/wcfsetup/install/lang/de.xml @@ -2327,6 +2327,9 @@ Fehler sind beispielsweise:
  • Safari
  • Windows Internet Explorer
  • ]]> + + + diff --git a/wcfsetup/install/lang/en.xml b/wcfsetup/install/lang/en.xml index 33642a064a..7feeb6f4cf 100644 --- a/wcfsetup/install/lang/en.xml +++ b/wcfsetup/install/lang/en.xml @@ -2188,6 +2188,9 @@ Errors are: Weitere Informationen]]> + + + -- 2.20.1