|
|
@@ -644,12 +644,15 @@ class BxBaseModGroupsModule extends BxBaseModProfileModule
|
|
|
}
|
|
|
|
|
|
protected function _checkAllowedConnect (&$aDataEntry, $isPerformAction, $sObjConnection, $isMutual, $isInvertResult, $isSwap = false)
|
|
|
- {
|
|
|
+ {
|
|
|
$sResult = $this->checkAllowedView($aDataEntry);
|
|
|
|
|
|
$oPrivacy = BxDolPrivacy::getObjectInstance($this->_oConfig->CNF['OBJECT_PRIVACY_VIEW']);
|
|
|
|
|
|
- if (CHECK_ACTION_RESULT_ALLOWED !== $sResult && !in_array($aDataEntry[$this->_oConfig->CNF['FIELD_ALLOW_VIEW_TO']], array('c', 's')))
|
|
|
+ // if profile view isn't allowed but visibility is in partially visible groups
|
|
|
+ // then display buttons to connect (befriend, join) to profile,
|
|
|
+ // if other conditions (in parent::_checkAllowedConnect) are met as well
|
|
|
+ if (CHECK_ACTION_RESULT_ALLOWED !== $sResult && !in_array($aDataEntry[$this->_oConfig->CNF['FIELD_ALLOW_VIEW_TO']], $oPrivacy->getPartiallyVisiblePrivacyGroups()))
|
|
|
return $sResult;
|
|
|
|
|
|
return parent::_checkAllowedConnect ($aDataEntry, $isPerformAction, $sObjConnection, $isMutual, $isInvertResult, $isSwap);
|