BxForumFormsEntryHelper.php 922 B

12345678910111213141516171819202122232425262728293031323334353637
  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. $s = parent::onDataAddAfter($iAccountId, $iContentId);
  24. if(!empty($s))
  25. return $s;
  26. if(getParam($CNF['PARAM_AUTOSUBSCRIBE_CREATED']) == 'on')
  27. BxDolConnection::getObjectInstance($CNF['OBJECT_CONNECTION_SUBSCRIBERS'])->actionAdd($iContentId, BxDolProfile::getInstanceByAccount($iAccountId)->id());
  28. return '';
  29. }
  30. }
  31. /** @} */