From 85d547b5bf569dc4e664b76628e7260042b4312c Mon Sep 17 00:00:00 2001 From: AlexeyUna Date: Thu, 8 Aug 2024 18:14:21 +0300 Subject: [PATCH] Ticket #4763 --- modules/base/groups/classes/BxBaseModGroupsPageEntry.php | 8 +++++--- modules/boonex/channels/classes/BxCnlConfig.php | 1 + modules/boonex/courses/classes/BxCoursesConfig.php | 1 + modules/boonex/events/classes/BxEventsConfig.php | 1 + modules/boonex/groups/classes/BxGroupsConfig.php | 1 + modules/boonex/jobs/classes/BxJobsConfig.php | 1 + modules/boonex/organizations/classes/BxOrgsConfig.php | 1 + modules/boonex/persons/classes/BxPersonsConfig.php | 1 + modules/boonex/spaces/classes/BxSpacesConfig.php | 1 + 9 files changed, 13 insertions(+), 3 deletions(-) diff --git a/modules/base/groups/classes/BxBaseModGroupsPageEntry.php b/modules/base/groups/classes/BxBaseModGroupsPageEntry.php index 1ae8dabc71..4bd3ab23d1 100644 --- a/modules/base/groups/classes/BxBaseModGroupsPageEntry.php +++ b/modules/base/groups/classes/BxBaseModGroupsPageEntry.php @@ -128,12 +128,14 @@ protected function _isVisiblePage ($a) $bPartiallyVisible = false; if(!empty($CNF['OBJECT_PRIVACY_VIEW']) && ($oPrivacy = BxDolPrivacy::getObjectInstance($CNF['OBJECT_PRIVACY_VIEW'])) !== false) $bPartiallyVisible = $oPrivacy->isPartiallyVisible($this->_aContentInfo[$CNF['FIELD_ALLOW_VIEW_TO']]); - /* * If partially visible, replace current page with different set of blocks. */ - if($bPartiallyVisible && $this->_sObject == $CNF['OBJECT_PAGE_VIEW_ENTRY']) { - $aObject = BxDolPageQuery::getPageObject($CNF['OBJECT_PAGE_VIEW_ENTRY_CLOSED']); + + $bJoinPage = isset($CNF['OBJECT_PAGE_JOINED_ENTRY']) && $this->_sObject === $CNF['OBJECT_PAGE_JOINED_ENTRY']; + if($bPartiallyVisible && ($this->_sObject === $CNF['OBJECT_PAGE_VIEW_ENTRY'] || $bJoinPage)) { + $sPage = $bJoinPage ? $CNF['OBJECT_PAGE_JOINED_ENTRY'] : $CNF['OBJECT_PAGE_VIEW_ENTRY_CLOSED']; + $aObject = BxDolPageQuery::getPageObject($sPage); $this->_sObject = $aObject['object']; $this->_aObject = $aObject; $this->_oQuery = new BxDolPageQuery($this->_aObject); diff --git a/modules/boonex/channels/classes/BxCnlConfig.php b/modules/boonex/channels/classes/BxCnlConfig.php index 8da16a0d6b..5e239be486 100644 --- a/modules/boonex/channels/classes/BxCnlConfig.php +++ b/modules/boonex/channels/classes/BxCnlConfig.php @@ -110,6 +110,7 @@ function __construct($aModule) 'OBJECT_MENU_MANAGE_TOOLS' => 'bx_channels_menu_manage_tools', //manage menu in content administration tools 'OBJECT_PAGE_VIEW_ENTRY' => 'bx_channels_view_profile', 'OBJECT_PAGE_VIEW_ENTRY_CLOSED' => 'bx_channels_view_profile_closed', + 'OBJECT_PAGE_JOINED_ENTRY' => 'bx_channels_join_profile', 'OBJECT_PRIVACY_VIEW' => 'bx_channels_allow_view_to', 'OBJECT_PRIVACY_VIEW_NOTIFICATION_EVENT' => 'bx_channels_allow_view_notification_to', 'OBJECT_GRID_ADMINISTRATION' => 'bx_channels_administration', diff --git a/modules/boonex/courses/classes/BxCoursesConfig.php b/modules/boonex/courses/classes/BxCoursesConfig.php index a3d69ec104..05d61229b9 100644 --- a/modules/boonex/courses/classes/BxCoursesConfig.php +++ b/modules/boonex/courses/classes/BxCoursesConfig.php @@ -138,6 +138,7 @@ function __construct($aModule) 'OBJECT_MENU_MANAGE_TOOLS' => 'bx_courses_menu_manage_tools', //manage menu in content administration tools 'OBJECT_PAGE_VIEW_ENTRY' => 'bx_courses_view_profile', 'OBJECT_PAGE_VIEW_ENTRY_CLOSED' => 'bx_courses_view_profile_closed', + 'OBJECT_PAGE_JOINED_ENTRY' => 'bx_courses_join_profile', 'OBJECT_PRIVACY_VIEW' => 'bx_courses_allow_view_to', 'OBJECT_PRIVACY_LIST_VIEW' => 'bx_courses_allow_view_favorite_list', 'OBJECT_PRIVACY_VIEW_NOTIFICATION_EVENT' => 'bx_courses_allow_view_notification_to', diff --git a/modules/boonex/events/classes/BxEventsConfig.php b/modules/boonex/events/classes/BxEventsConfig.php index 186654227d..e01f0785d4 100644 --- a/modules/boonex/events/classes/BxEventsConfig.php +++ b/modules/boonex/events/classes/BxEventsConfig.php @@ -165,6 +165,7 @@ function __construct($aModule) 'OBJECT_MENU_MANAGE_TOOLS' => 'bx_events_menu_manage_tools', //manage menu in content administration tools 'OBJECT_PAGE_VIEW_ENTRY' => 'bx_events_view_profile', 'OBJECT_PAGE_VIEW_ENTRY_CLOSED' => 'bx_events_view_profile_closed', + 'OBJECT_PAGE_JOINED_ENTRY' => 'bx_events_join_profile', 'OBJECT_PRIVACY_VIEW' => 'bx_events_allow_view_to', 'OBJECT_PRIVACY_LIST_VIEW' => 'bx_events_allow_view_favorite_list', 'OBJECT_PRIVACY_VIEW_NOTIFICATION_EVENT' => 'bx_events_allow_view_notification_to', diff --git a/modules/boonex/groups/classes/BxGroupsConfig.php b/modules/boonex/groups/classes/BxGroupsConfig.php index 4af87f01ee..0bfb51bb6f 100644 --- a/modules/boonex/groups/classes/BxGroupsConfig.php +++ b/modules/boonex/groups/classes/BxGroupsConfig.php @@ -143,6 +143,7 @@ function __construct($aModule) 'OBJECT_MENU_MANAGE_TOOLS' => 'bx_groups_menu_manage_tools', //manage menu in content administration tools 'OBJECT_PAGE_VIEW_ENTRY' => 'bx_groups_view_profile', 'OBJECT_PAGE_VIEW_ENTRY_CLOSED' => 'bx_groups_view_profile_closed', + 'OBJECT_PAGE_JOINED_ENTRY' => 'bx_groups_join_profile', 'OBJECT_PRIVACY_VIEW' => 'bx_groups_allow_view_to', 'OBJECT_PRIVACY_LIST_VIEW' => 'bx_groups_allow_view_favorite_list', 'OBJECT_PRIVACY_VIEW_NOTIFICATION_EVENT' => 'bx_groups_allow_view_notification_to', diff --git a/modules/boonex/jobs/classes/BxJobsConfig.php b/modules/boonex/jobs/classes/BxJobsConfig.php index 01cc21dc21..55cd5fd6be 100644 --- a/modules/boonex/jobs/classes/BxJobsConfig.php +++ b/modules/boonex/jobs/classes/BxJobsConfig.php @@ -153,6 +153,7 @@ function __construct($aModule) 'OBJECT_MENU_MANAGE_TOOLS' => 'bx_jobs_menu_manage_tools', //manage menu in content administration tools 'OBJECT_PAGE_VIEW_ENTRY' => 'bx_jobs_view_profile', 'OBJECT_PAGE_VIEW_ENTRY_CLOSED' => 'bx_jobs_view_profile_closed', + 'OBJECT_PAGE_JOINED_ENTRY' => 'bx_jobs_join_profile', 'OBJECT_PRIVACY_VIEW' => 'bx_jobs_allow_view_to', 'OBJECT_PRIVACY_LIST_VIEW' => 'bx_jobs_allow_view_favorite_list', 'OBJECT_PRIVACY_VIEW_NOTIFICATION_EVENT' => 'bx_jobs_allow_view_notification_to', diff --git a/modules/boonex/organizations/classes/BxOrgsConfig.php b/modules/boonex/organizations/classes/BxOrgsConfig.php index 5986006beb..e61a8093a1 100644 --- a/modules/boonex/organizations/classes/BxOrgsConfig.php +++ b/modules/boonex/organizations/classes/BxOrgsConfig.php @@ -164,6 +164,7 @@ function __construct($aModule) 'OBJECT_MENU_MANAGE_TOOLS' => 'bx_organizations_menu_manage_tools', //manage menu in content administration tools 'OBJECT_PAGE_VIEW_ENTRY' => 'bx_organizations_view_profile', 'OBJECT_PAGE_VIEW_ENTRY_CLOSED' => 'bx_organizations_view_profile_closed', + 'OBJECT_PAGE_JOINED_ENTRY' => 'bx_organizations_join_profile', 'OBJECT_PRIVACY_VIEW' => 'bx_organizations_allow_view_to', 'OBJECT_PRIVACY_LIST_VIEW' => 'bx_organizations_allow_view_favorite_list', 'OBJECT_PRIVACY_VIEW_NOTIFICATION_EVENT' => 'bx_organizations_allow_view_notification_to', diff --git a/modules/boonex/persons/classes/BxPersonsConfig.php b/modules/boonex/persons/classes/BxPersonsConfig.php index 32d4e7682d..f2e29f3ec2 100644 --- a/modules/boonex/persons/classes/BxPersonsConfig.php +++ b/modules/boonex/persons/classes/BxPersonsConfig.php @@ -130,6 +130,7 @@ function __construct($aModule) 'OBJECT_MENU_MANAGE_TOOLS' => 'bx_persons_menu_manage_tools', //manage menu in content administration tools 'OBJECT_PAGE_VIEW_ENTRY' => 'bx_persons_view_profile', 'OBJECT_PAGE_VIEW_ENTRY_CLOSED' => 'bx_persons_view_profile_closed', + 'OBJECT_PAGE_JOINED_ENTRY' => 'bx_persons_join_profile', 'OBJECT_PRIVACY_VIEW' => 'bx_persons_allow_view_to', 'OBJECT_PRIVACY_POST' => 'bx_persons_allow_post_to', 'OBJECT_PRIVACY_CONTACT' => 'bx_persons_allow_contact_to', diff --git a/modules/boonex/spaces/classes/BxSpacesConfig.php b/modules/boonex/spaces/classes/BxSpacesConfig.php index 57f7b9fbf3..4edbadf854 100644 --- a/modules/boonex/spaces/classes/BxSpacesConfig.php +++ b/modules/boonex/spaces/classes/BxSpacesConfig.php @@ -139,6 +139,7 @@ function __construct($aModule) 'OBJECT_MENU_MANAGE_TOOLS' => 'bx_spaces_menu_manage_tools', //manage menu in content administration tools 'OBJECT_PAGE_VIEW_ENTRY' => 'bx_spaces_view_profile', 'OBJECT_PAGE_VIEW_ENTRY_CLOSED' => 'bx_spaces_view_profile_closed', + 'OBJECT_PAGE_JOINED_ENTRY' => 'bx_spaces_join_profile', 'OBJECT_PRIVACY_VIEW' => 'bx_spaces_allow_view_to', 'OBJECT_PRIVACY_LIST_VIEW' => 'bx_spaces_allow_view_favorite_list', 'OBJECT_PRIVACY_VIEW_NOTIFICATION_EVENT' => 'bx_spaces_allow_view_notification_to',