-
- if (in_array($_SESSION['page_flags'], [PAGE_NORMAL, PAGE_SOAPBOX, PAGE_FREELOVE, PAGE_PRVGROUP])) {
- // only show friend requests for normal pages. Other page types have automatic friendship.
- if (in_array($_SESSION['page_flags'], [PAGE_NORMAL, PAGE_SOAPBOX, PAGE_PRVGROUP])) {
- $nav['introductions'] = ['notifications/intros', L10n::t('Introductions'), '', L10n::t('Friend Requests')];
- }
- if (in_array($_SESSION['page_flags'], [PAGE_NORMAL, PAGE_SOAPBOX, PAGE_FREELOVE])) {
- $nav['notifications'] = ['notifications', L10n::t('Notifications'), '', L10n::t('Notifications')];
- $nav['notifications']['all'] = ['notifications/system', L10n::t('See all notifications'), '', ''];
- $nav['notifications']['mark'] = ['', L10n::t('Mark as seen'), '', L10n::t('Mark all system notifications seen')];
- }
+
+ // Don't show notifications for public communities
+ if (defaults($_SESSION, 'page_flags', '') != Contact::PAGE_COMMUNITY) {
+ $nav['introductions'] = ['notifications/intros', L10n::t('Introductions'), '', L10n::t('Friend Requests')];
+ $nav['notifications'] = ['notifications', L10n::t('Notifications'), '', L10n::t('Notifications')];
+ $nav['notifications']['all'] = ['notifications/system', L10n::t('See all notifications'), '', ''];
+ $nav['notifications']['mark'] = ['', L10n::t('Mark as seen'), '', L10n::t('Mark all system notifications seen')];