|
|
@@ -210,6 +210,8 @@ class BxDolPrivacy extends BxDol implements iBxDolFactoryObject
|
|
|
public function getContentPublicAsCondition($iProfileIdOwner = 0, $aCustomGroups = array())
|
|
|
{
|
|
|
$mixedPrivacyGroups = $this->getPrivacyGroupsForContentPublic($iProfileIdOwner, $aCustomGroups);
|
|
|
+ if($mixedPrivacyGroups === true)
|
|
|
+ return array();
|
|
|
|
|
|
return $this->getContentByGroupAsCondition($mixedPrivacyGroups);
|
|
|
}
|
|
|
@@ -233,6 +235,8 @@ class BxDolPrivacy extends BxDol implements iBxDolFactoryObject
|
|
|
public function getContentPublicAsSQLPart($iProfileIdOwner = 0, $aCustomGroups = array())
|
|
|
{
|
|
|
$mixedPrivacyGroups = $this->getPrivacyGroupsForContentPublic($iProfileIdOwner, $aCustomGroups);
|
|
|
+ if($mixedPrivacyGroups === true)
|
|
|
+ return array();
|
|
|
|
|
|
return $this->getContentByGroupAsSQLPart($mixedPrivacyGroups);
|
|
|
}
|
|
|
@@ -291,19 +295,18 @@ class BxDolPrivacy extends BxDol implements iBxDolFactoryObject
|
|
|
|
|
|
protected function getPrivacyGroupsForContentPublic($iProfileIdOwner = 0, $aCustomGroups = array())
|
|
|
{
|
|
|
- $mixedPrivacyGroups = array(BX_DOL_PG_ALL);
|
|
|
+ $aGroups = array(BX_DOL_PG_ALL);
|
|
|
if(isLogged()) {
|
|
|
$iProfileIdLogged = bx_get_logged_profile_id();
|
|
|
if($iProfileIdLogged == $iProfileIdOwner)
|
|
|
- return array();
|
|
|
+ return true;
|
|
|
|
|
|
- if ($iProfileIdOwner && $this->checkFriends($iProfileIdOwner, bx_get_logged_profile_id()))
|
|
|
- $mixedPrivacyGroups = array(BX_DOL_PG_ALL, BX_DOL_PG_MEMBERS, BX_DOL_PG_FRIENDS);
|
|
|
- else
|
|
|
- $mixedPrivacyGroups = array(BX_DOL_PG_ALL, BX_DOL_PG_MEMBERS);
|
|
|
+ $aGroups[] = BX_DOL_PG_MEMBERS;
|
|
|
+ if($iProfileIdOwner && $this->checkFriends($iProfileIdOwner, $iProfileIdLogged))
|
|
|
+ $aGroups[] = BX_DOL_PG_FRIENDS;
|
|
|
}
|
|
|
|
|
|
- return array_merge($mixedPrivacyGroups, $aCustomGroups);
|
|
|
+ return array_merge($aGroups, $aCustomGroups);
|
|
|
}
|
|
|
|
|
|
protected function getCheckMethod($s)
|