Cheetah
modules
cheetah
simple_messenger
classes
ChSimpleMessengerPrivacy.php
Go to the documentation of this file.
1
<?
php
2
8
ch_import
(
'ChWsbPrivacy'
);
9
10
class
ChSimpleMessengerPrivacy
extends
ChWsbPrivacy
11
{
15
function
__construct
(&
$oModule
)
16
{
17
parent::__construct(
$oModule
-> _oDb -> sTablePrefix .
'privacy'
,
'author_id'
,
'author_id'
);
18
}
19
28
function
check
(
$sAction
, $iObjectId, $iViewerId = 0)
29
{
30
if
(
empty
($iViewerId))
31
$iViewerId =
getLoggedId
();
32
33
$aObject = $this->_oDb->getObjectInfo($this->
getFieldAction
(
$sAction
), $iObjectId);
34
if
(
empty
($aObject) || !is_array($aObject))
35
return
true
;
36
37
if
($iViewerId == $aObject[
'owner_id'
])
38
return
true
;
39
40
if
($this->_oDb->isGroupMember($aObject[
'group_id'
], $aObject[
'owner_id'
], $iViewerId))
41
return
true
;
42
43
return
$this->
isDynamicGroupMember
($aObject[
'group_id'
], $aObject[
'owner_id'
], $iViewerId, $iObjectId);
44
}
45
}
$oModule
if(! @isAdmin()) $oModule
Definition:
admin.php:25
ChSimpleMessengerPrivacy\__construct
__construct(&$oModule)
Definition:
ChSimpleMessengerPrivacy.php:15
ch_import
ch_import($sClassName, $aModule=array())
Definition:
utils.inc.php:1218
php
ChSimpleMessengerPrivacy
Definition:
ChSimpleMessengerPrivacy.php:11
getLoggedId
getLoggedId()
Definition:
profiles.inc.php:32
ChWsbPrivacy\getFieldAction
getFieldAction($sAction)
Definition:
ChWsbPrivacy.php:154
ChWsbPrivacy\isDynamicGroupMember
isDynamicGroupMember($mixedGroupId, $iObjectOwnerId, $iViewerId, $iObjectId)
Definition:
ChWsbPrivacy.php:167
ChWsbPrivacy
Definition:
ChWsbPrivacy.php:60
$sAction
$sAction
Definition:
categories.php:274
empty
Attr AllowedRel this is empty
Definition:
Attr.AllowedRel.txt:7
ChSimpleMessengerPrivacy\check
check($sAction, $iObjectId, $iViewerId=0)
Definition:
ChSimpleMessengerPrivacy.php:28
Generated by
1.8.20