BxCnlModule.php 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  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. * @defdroup Channels Channels
  7. * @indroup UnaModules
  8. *
  9. * @{
  10. */
  11. /**
  12. * Spaces profiles module.
  13. */
  14. class BxCnlModule extends BxBaseModGroupsModule
  15. {
  16. function __construct(&$aModule)
  17. {
  18. parent::__construct($aModule);
  19. $this->_aSearchableNamesExcept[] = $this->_oConfig->CNF['FIELD_JOIN_CONFIRMATION'];
  20. }
  21. public function checkAllowedSubscribeAdd (&$aDataEntry, $isPerformAction = false)
  22. {
  23. return parent::_checkAllowedSubscribeAdd ($aDataEntry, $isPerformAction);
  24. }
  25. public function actionH($sName)
  26. {
  27. $iId = $this->_oDb->getChannelIdByName($sName);
  28. $_GET['id'] = $iId;
  29. $oPage = BxDolPage::getObjectInstance('bx_channels_view_profile');
  30. echo $oPage->getCode($sName);
  31. }
  32. function addChannel($sName)
  33. {
  34. //todo IdProfile
  35. $CNF = &$this->_oConfig->CNF;
  36. $this->serviceEntityAdd(6, array($CNF['FIELD_NAME'] => $sName));
  37. }
  38. }
  39. /** @} */