BxForumFormsEntryHelper.php 872 B

123456789101112131415161718192021222324252627282930313233343536
  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 Forum Forum
  7. * @ingroup UnaModules
  8. *
  9. * @{
  10. */
  11. /**
  12. * Entry forms helper functions
  13. */
  14. class BxForumFormsEntryHelper extends BxBaseModTextFormsEntryHelper
  15. {
  16. public function __construct($oModule)
  17. {
  18. parent::__construct($oModule);
  19. }
  20. public function onDataAddAfter ($iAccountId, $iContentId)
  21. {
  22. $CNF = &$this->_oModule->_oConfig->CNF;
  23. if($s = parent::onDataAddAfter($iAccountId, $iContentId))
  24. return $s;
  25. if(getParam($CNF['PARAM_AUTOSUBSCRIBE_CREATED']) == 'on')
  26. BxDolConnection::getObjectInstance($CNF['OBJECT_CONNECTION_SUBSCRIBERS'])->actionAdd($iContentId, $this->_iProfileId);
  27. return '';
  28. }
  29. }
  30. /** @} */