From: Marcel Werk Date: Sun, 22 May 2016 08:20:05 +0000 (+0200) Subject: Removed obsolete code / xml definitions X-Git-Tag: 3.0.0_Beta_1~1682 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=ced41de94f5b707cbf56dcb144e5fd1745dd45c1;p=GitHub%2FWoltLab%2FWCF.git Removed obsolete code / xml definitions --- diff --git a/CHANGELOG.md b/CHANGELOG.md index b8a88ed7b1..d0319da22c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -34,7 +34,7 @@ #### CMS -* User online location is handled via the `wcf\data\page\Page` objects. Static locations only need a language item `wcf.page.onlineLocation.{$page->identifier}`, more complex locations can use the online location-related methods of `wcf\system\page\handler\IMenuPageHandler`. For CMS pages, their title is used. +* User online location is handled via the `wcf\data\page\Page` objects. Complex locations can use the online location-related methods of `wcf\system\page\handler\IMenuPageHandler`. #### New Traits @@ -59,9 +59,15 @@ * `wcf\system\clipboard\action\UserExtendedClipboardAction` removed. * `wcf\system\event\listener\PreParserAtUserListener` removed. * `wcf\action\AJAXProxyAction::getData()` removed. +* `wcf\system\page\PageManager` removed. +* `wcf\system\option\PageMultiSelectOptionType` removed. +* `wcf\system\option\PageSelectOptionType` removed. +* `wcf\system\user\online\location\UserLocation` removed. * Version system removed. * Support for query string based sessions in Frontend removed. * Language server system removed. +* Object type definition `com.woltlab.wcf.user.online.location` removed. +* Object type definition `com.woltlab.wcf.page` removed. #### Documentation diff --git a/com.woltlab.wcf/objectType.xml b/com.woltlab.wcf/objectType.xml index d2ba8179fc..df9fcecad9 100644 --- a/com.woltlab.wcf/objectType.xml +++ b/com.woltlab.wcf/objectType.xml @@ -387,207 +387,6 @@ - - - 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.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.PaidSubscriptionListPage - com.woltlab.wcf.page - - module_paid_subscription - 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 - - - com.woltlab.wcf.page diff --git a/com.woltlab.wcf/objectTypeDefinition.xml b/com.woltlab.wcf/objectTypeDefinition.xml index 4dc1a6b340..26c32bbeef 100644 --- a/com.woltlab.wcf/objectTypeDefinition.xml +++ b/com.woltlab.wcf/objectTypeDefinition.xml @@ -145,10 +145,6 @@ - - com.woltlab.wcf.page - - com.woltlab.wcf.condition.notice @@ -213,6 +209,10 @@ + + com.woltlab.wcf.page + + com.woltlab.wcf.user.online.location diff --git a/wcfsetup/install/files/lib/system/option/PageMultiSelectOptionType.class.php b/wcfsetup/install/files/lib/system/option/PageMultiSelectOptionType.class.php deleted file mode 100644 index b711dc8536..0000000000 --- a/wcfsetup/install/files/lib/system/option/PageMultiSelectOptionType.class.php +++ /dev/null @@ -1,23 +0,0 @@ - - * @package com.woltlab.wcf - * @subpackage system.option - * @category Community Framework - */ -class PageMultiSelectOptionType extends MultiSelectOptionType { - /** - * @inheritDoc - */ - protected function getSelectOptions(Option $option) { - return PageManager::getInstance()->getSelection($option->application); - } -} diff --git a/wcfsetup/install/files/lib/system/option/PageSelectOptionType.class.php b/wcfsetup/install/files/lib/system/option/PageSelectOptionType.class.php deleted file mode 100644 index 31b67e6362..0000000000 --- a/wcfsetup/install/files/lib/system/option/PageSelectOptionType.class.php +++ /dev/null @@ -1,23 +0,0 @@ - - * @package com.woltlab.wcf - * @subpackage system.option - * @category Community Framework - */ -class PageSelectOptionType extends SelectOptionType { - /** - * @inheritDoc - */ - protected function getSelectOptions(Option $option) { - return PageManager::getInstance()->getSelection($option->application); - } -} diff --git a/wcfsetup/install/files/lib/system/page/PageManager.class.php b/wcfsetup/install/files/lib/system/page/PageManager.class.php deleted file mode 100644 index fd90f81594..0000000000 --- a/wcfsetup/install/files/lib/system/page/PageManager.class.php +++ /dev/null @@ -1,96 +0,0 @@ - - * @package com.woltlab.wcf - * @subpackage system.page - * @category Community Framework - */ -class PageManager extends SingletonFactory { - /** - * list of available page object types - * @var ObjectType[] - */ - protected $objectTypes = []; - - /** - * @inheritDoc - */ - protected function init() { - $this->objectTypes = ObjectTypeCache::getInstance()->getObjectTypes('com.woltlab.wcf.page'); - } - - /** - * Returns a list of the available page object types. - * - * @return ObjectType[] - */ - public function getObjectTypes() { - return $this->objectTypes; - } - - /** - * Returns an array used to build a page selection. If $application is given, - * only pages who belong to the application with the given abbreviation - * are returned. - * - * @param string $application - * @return string[] - * @throws SystemException - */ - public function getSelection($application = null) { - $objectTypes = $this->objectTypes; - - // filter by application - if ($application !== null) { - // validate application - if ($application != 'wcf' && ApplicationHandler::getInstance()->getApplication($application) === null) { - throw new SystemException("Unknown application with abbreviation '".$application."'"); - } - - foreach ($objectTypes as $objectTypeName => $objectType) { - $classNamePieces = explode('\\', $objectType->className); - - if ($classNamePieces[0] != $application) { - unset($objectTypes[$objectTypeName]); - } - } - } - - // filter by options - foreach ($objectTypes as $objectTypeName => $objectType) { - if (!$objectType->validateOptions()) { - unset($objectTypes[$objectTypeName]); - } - } - - $selection = []; - foreach ($objectTypes as $objectType) { - $categoryName = WCF::getLanguage()->get('wcf.page.category.'.$objectType->categoryname); - if (!isset($selection[$categoryName])) { - $selection[$categoryName] = []; - } - - $selection[$categoryName][$objectType->objectTypeID] = WCF::getLanguage()->get('wcf.page.'.$objectType->objectType); - } - - ksort($selection); - - foreach ($selection as &$subSelection) { - asort($subSelection); - } - - return $selection; - } -} diff --git a/wcfsetup/install/files/lib/system/user/online/location/UserLocation.class.php b/wcfsetup/install/files/lib/system/user/online/location/UserLocation.class.php deleted file mode 100644 index da7897d254..0000000000 --- a/wcfsetup/install/files/lib/system/user/online/location/UserLocation.class.php +++ /dev/null @@ -1,68 +0,0 @@ - - * @package com.woltlab.wcf - * @subpackage system.user.online.location - * @category Community Framework - * @deprecated since 2.2 - */ -class UserLocation implements IUserOnlineLocation { - /** - * user ids - * @var integer[] - */ - protected $userIDs = []; - - /** - * list of users - * @var User[] - */ - protected $users = null; - - /** - * @inheritDoc - */ - public function cache(UserOnline $user) { - if ($user->objectID) $this->userIDs[] = $user->objectID; - } - - /** - * @inheritDoc - */ - public function get(UserOnline $user, $languageVariable = '') { - if ($this->users === null) { - $this->readUsers(); - } - - if (!isset($this->users[$user->objectID])) { - return ''; - } - - return WCF::getLanguage()->getDynamicVariable($languageVariable, ['user' => $this->users[$user->objectID]]); - } - - /** - * Loads the users. - */ - protected function readUsers() { - $this->users = []; - - if (empty($this->userIDs)) return; - $this->userIDs = array_unique($this->userIDs); - - $userList = new UserList(); - $userList->setObjectIDs($this->userIDs); - $userList->readObjects(); - $this->users = $userList->getObjects(); - } -} diff --git a/wcfsetup/install/lang/de.xml b/wcfsetup/install/lang/de.xml index dc1cbfb7f4..b7bfc0c605 100644 --- a/wcfsetup/install/lang/de.xml +++ b/wcfsetup/install/lang/de.xml @@ -2507,9 +2507,6 @@ Fehler sind beispielsweise: Weitere Informationen]]> - - - userID}">{$user->username}]]> diff --git a/wcfsetup/install/lang/en.xml b/wcfsetup/install/lang/en.xml index 7ee57538f4..bd6a2e1bbd 100644 --- a/wcfsetup/install/lang/en.xml +++ b/wcfsetup/install/lang/en.xml @@ -2545,9 +2545,6 @@ Errors are: More details]]> - - - userID}">{$user->username}]]>