function isAllowedView(&$aFile, $isPerformAction = false)
{
$bAdmin = $this->isAdmin($this->_iProfileId);
if ($bAdmin || $aFile['medProfId'] == $this->_iProfileId) {
return true;
}
if (!$bAdmin && $aFile['Approved'] != 'approved') {
return false;
}
$aOwnerInfo = getProfileInfo($aFile['medProfId']);
if ($aOwnerInfo['Status'] == 'Rejected' || $aOwnerInfo['Status'] == 'Suspended') {
return false;
}
if (!$this->oAlbumPrivacy->check('album_view', $aFile['albumId'], $this->_iProfileId)) {
return false;
}
$this->_defineActions();
$aCheck = checkAction($this->_iProfileId, $this->_defineActionName('view'), $isPerformAction);
if ($aCheck[CHECK_ACTION_RESULT] != CHECK_ACTION_RESULT_ALLOWED) {
return false;
}
return true;
}