BxGroupsPrivacyNotifications.php 882 B

123456789101112131415161718192021222324252627282930313233
  1. <?php defined('BX_DOL') or die('hack attempt');
  2. /**
  3. * Copyright (c) BoonEx Pty Limited - http://www.boonex.com/
  4. * CC-BY License - http://creativecommons.org/licenses/by/3.0/
  5. *
  6. * @defgroup Groups Groups
  7. * @ingroup TridentModules
  8. *
  9. * @{
  10. */
  11. bx_import('Privacy', 'bx_groups');
  12. class BxGroupsPrivacyNotifications extends BxGroupsPrivacy
  13. {
  14. function __construct($aOptions, $oTemplate = false)
  15. {
  16. parent::__construct($aOptions, $oTemplate);
  17. }
  18. function check($iObjectId, $iViewerId = 0)
  19. {
  20. if (!parent::check($iObjectId, $iViewerId))
  21. return false;
  22. if (!($aEvent = BxDolService::call('bx_notifications', 'get_event_by_id', array($iObjectId))))
  23. return false;
  24. return $this->_oModule->_oDb->isAdmin($aEvent['object_owner_id'], $iViewerId ? $iViewerId : bx_get_logged_profile_id());
  25. }
  26. }
  27. /** @} */