BxEventsAlertsResponse.php 1002 B

12345678910111213141516171819202122232425262728293031323334
  1. <?php defined('BX_DOL') or die('hack attempt');
  2. /**
  3. * Copyright (c) UNA, Inc - https://una.io
  4. * MIT License - https://opensource.org/licenses/MIT
  5. *
  6. * @defgroup Events Events
  7. * @ingroup UnaModules
  8. *
  9. * @{
  10. */
  11. class BxEventsAlertsResponse extends BxBaseModGroupsAlertsResponse
  12. {
  13. public function __construct()
  14. {
  15. $this->MODULE = 'bx_events';
  16. parent::__construct();
  17. }
  18. public function response($oAlert)
  19. {
  20. parent::response($oAlert);
  21. if(isset($oAlert->aExtras['module'] ) && $oAlert->aExtras['module'] == $this->MODULE && $oAlert->sAction == 'check_allowed_fan_add' && $oAlert->sUnit == 'system'){
  22. if (getParam('bx_events_enable_subscribe_for_past_events') != 'on'){
  23. $CNF = $this->_oModule->_oConfig->CNF;
  24. if ($oAlert->aExtras['content_info'][$CNF['FIELD_DATE_END']] < time()){
  25. $oAlert->aExtras['override_result'] = false;
  26. }
  27. }
  28. }
  29. }
  30. }
  31. /** @} */