Added missing module setting
authorMarcel Werk <burntime@woltlab.com>
Wed, 5 Jun 2013 17:44:01 +0000 (19:44 +0200)
committerMarcel Werk <burntime@woltlab.com>
Wed, 5 Jun 2013 17:44:01 +0000 (19:44 +0200)
com.woltlab.wcf/option.xml
com.woltlab.wcf/pageMenu.xml
wcfsetup/install/files/lib/form/UserSearchForm.class.php
wcfsetup/install/files/lib/page/MembersListPage.class.php
wcfsetup/install/files/lib/page/RecentActivityListPage.class.php
wcfsetup/install/files/lib/page/TeamPage.class.php
wcfsetup/install/files/lib/page/UserPage.class.php
wcfsetup/install/files/lib/page/UsersOnlineListPage.class.php
wcfsetup/install/files/lib/system/menu/TreeMenu.class.php
wcfsetup/install/lang/de.xml
wcfsetup/install/lang/en.xml

index 7cbbc3bba2d1d52875e711c4be2d089f7cf8a891..3f145ffb8e171055f15025f16a64c7014a2d587a 100644 (file)
                                <optiontype>boolean</optiontype>
                                <defaultvalue>1</defaultvalue>
                        </option>
+                       <option name="module_members_list">
+                               <categoryname>module.user</categoryname>
+                               <optiontype>boolean</optiontype>
+                               <defaultvalue>1</defaultvalue>
+                       </option>
                        <option name="module_team_page">
                                <categoryname>module.user</categoryname>
                                <optiontype>boolean</optiontype>
index 4cca9197b1035570445a663ba703f47f6e372555..6badd051c870d9d857b398e1f838f33bad4c3fb5 100644 (file)
@@ -11,6 +11,7 @@
                        <controller><![CDATA[wcf\page\MembersListPage]]></controller>
                        <position>header</position>
                        <permissions>user.profile.canViewMembersList</permissions>
+                       <options>module_members_list</options>
                </pagemenuitem>
                
                <pagemenuitem name="wcf.user.recentActivity">
@@ -40,6 +41,7 @@
                        <position>header</position>
                        <parent>wcf.user.members</parent>
                        <permissions>user.profile.canViewMembersList</permissions>
+                       <options>module_members_list</options>
                </pagemenuitem>
        </import>
 </data>
\ No newline at end of file
index b51554db20bcd8c63bdd0930ca8e2555d7d6fcc6..165de4ed4140300506e7ef790282a48bea0500c7 100644 (file)
@@ -28,6 +28,11 @@ class UserSearchForm extends UserOptionListForm {
         */
        public $activeMenuItem = 'wcf.user.search';
        
+       /**
+        * @see wcf\page\AbstractPage::$neededModules
+        */
+       public $neededModules = array('MODULE_MEMBERS_LIST');
+       
        /**
         * username
         * @var string
index 81cdd6616654ecc25e29ac7f3e880fa570c2651f..e7c6d2eac4d85d8ca3849f86590e0c0a2b6dc4fd 100644 (file)
@@ -35,6 +35,11 @@ class MembersListPage extends SortablePage {
         */
        public $neededPermissions = array('user.profile.canViewMembersList');
        
+       /**
+        * @see wcf\page\AbstractPage::$neededModules
+        */
+       public $neededModules = array('MODULE_MEMBERS_LIST');
+       
        /**
         * @see wcf\page\AbstractPage::$enableTracking
         */
index 8a0a8fae9ad9eb9f6acdcda41d14a9aa140fc96f..9ade13e5ecd4752bb3e839f4f4a31145c93ba7a4 100644 (file)
@@ -40,7 +40,7 @@ class RecentActivityListPage extends AbstractPage {
                $this->eventList->readObjects();
                
                // add breadcrumbs
-               WCF::getBreadcrumbs()->add(new Breadcrumb(WCF::getLanguage()->get('wcf.user.members'), LinkHandler::getInstance()->getLink('MembersList')));
+               if (MODULE_MEMBERS_LIST) WCF::getBreadcrumbs()->add(new Breadcrumb(WCF::getLanguage()->get('wcf.user.members'), LinkHandler::getInstance()->getLink('MembersList')));
        }
        
        /**
index ffc422950afea8d0b06c89b62331e55cab80b26e..6df1dc69fb9710bba1bb105718c693aa2d82e322 100644 (file)
@@ -64,7 +64,7 @@ class TeamPage extends MultipleLinkPage {
                parent::readData();
                
                // add breadcrumbs
-               WCF::getBreadcrumbs()->add(new Breadcrumb(WCF::getLanguage()->get('wcf.user.members'), LinkHandler::getInstance()->getLink('MembersList')));
+               if (MODULE_MEMBERS_LIST) WCF::getBreadcrumbs()->add(new Breadcrumb(WCF::getLanguage()->get('wcf.user.members'), LinkHandler::getInstance()->getLink('MembersList')));
        }
        
        /**
index f7511870e2feadcbca3ccd2afb4364e7035e5990..a8f2687734c505ea0fec50f4e4cc1792ae01c6c9 100644 (file)
@@ -117,7 +117,7 @@ class UserPage extends AbstractPage {
                parent::readData();
                
                // add breadcrumbs
-               WCF::getBreadcrumbs()->add(new Breadcrumb(WCF::getLanguage()->get('wcf.user.members'), LinkHandler::getInstance()->getLink('MembersList')));
+               if (MODULE_MEMBERS_LIST) WCF::getBreadcrumbs()->add(new Breadcrumb(WCF::getLanguage()->get('wcf.user.members'), LinkHandler::getInstance()->getLink('MembersList')));
                
                // get profile content
                if ($this->editOnInit) {
index ed6e032c20e05dfddc3dc4093b8f93c523b8725d..d46c674181e4f5e444ec06e2ca21be9849200103 100644 (file)
@@ -91,7 +91,7 @@ class UsersOnlineListPage extends SortablePage {
                parent::readData();
                
                // add breadcrumbs
-               WCF::getBreadcrumbs()->add(new Breadcrumb(WCF::getLanguage()->get('wcf.user.members'), LinkHandler::getInstance()->getLink('MembersList')));
+               if (MODULE_MEMBERS_LIST) WCF::getBreadcrumbs()->add(new Breadcrumb(WCF::getLanguage()->get('wcf.user.members'), LinkHandler::getInstance()->getLink('MembersList')));
                
                // load locations
                foreach (ObjectTypeCache::getInstance()->getObjectTypes('com.woltlab.wcf.user.online.location') as $objectType) {
index bae7042a6d7d3af7273999de45431472c66f4b3b..dc57ba29f1c50fc7fe81cae8d42ea54a1599dd97 100644 (file)
@@ -161,13 +161,15 @@ abstract class TreeMenu extends SingletonFactory {
         * @param       string          $menuItem       name of the active menu item
         */
        public function setActiveMenuItem($menuItem) {
-               $this->activeMenuItems = array();
-               
-               // build active menu list
+               $newActiveMenuItems = array();
                while (isset($this->menuItemList[$menuItem])) {
-                       $this->activeMenuItems[] = $menuItem;
+                       $newActiveMenuItems[] = $menuItem;
                        $menuItem = $this->menuItemList[$menuItem]->parentMenuItem;
+                       
+                       if ($menuItem && !isset($this->menuItemList[$menuItem])) return false;
                }
+               
+               if (!empty($newActiveMenuItems)) $this->activeMenuItems = $newActiveMenuItems;
        }
        
        /**
index 3cc923897121b2d2bbf3effc75292fdffe466d6f..60483a3712aa110ab963011ad73a1c09e8a9fabe 100644 (file)
                <item name="wcf.acp.option.module_poll"><![CDATA[Umfragen]]></item>
                <item name="wcf.acp.option.poll_max_options"><![CDATA[Maximale Anzahl an Antworten]]></item>
                <item name="wcf.acp.option.error.validationFailed"><![CDATA[Sie haben einen ungültigen Inhalt eingegeben.]]></item>
+               <item name="wcf.acp.option.module_members_list"><![CDATA[Mitgliederliste]]></item>
        </category>
        
        <category name="wcf.acp.package">
index f2e0db85690613043aa2ab4f0646345c6a8398e4..899e0bbe704c211eadd087ef4c4d67f6d2f4e558 100644 (file)
@@ -777,6 +777,7 @@ Examples for medium ID detection:
                <item name="wcf.acp.option.module_poll"><![CDATA[Polls]]></item>
                <item name="wcf.acp.option.poll_max_options"><![CDATA[Maximum number of options]]></item>
                <item name="wcf.acp.option.error.validationFailed"><![CDATA[TOOD: Sie haben einen ungültigen Inhalt eingegeben.]]></item>
+               <item name="wcf.acp.option.module_members_list"><![CDATA[Members List]]></item>
        </category>
        
        <category name="wcf.acp.package">