BxTimelineCmts.php 1005 B

123456789101112131415161718192021222324252627282930313233343536373839
  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 Timeline Timeline
  7. * @ingroup UnaModules
  8. *
  9. * @{
  10. */
  11. class BxTimelineCmts extends BxTemplCmts
  12. {
  13. protected $_sModule;
  14. protected $_oModule;
  15. function __construct($sSystem, $iId, $iInit = 1)
  16. {
  17. parent::__construct($sSystem, $iId, $iInit);
  18. $this->_sModule = 'bx_timeline';
  19. $this->_oModule = BxDolModule::getInstance($this->_sModule);
  20. $this->_aSystem['trigger_field_privacy_view'] = 'object_privacy_view';
  21. }
  22. public function onPostAfter($iCmtId, $aDp = [])
  23. {
  24. $CNF = &$this->_oModule->_oConfig->CNF;
  25. $mixedResult = parent::onPostAfter($iCmtId, $aDp);
  26. if($mixedResult !== false)
  27. $this->_oModule->_oDb->updateEvent([$CNF['FIELD_REACTED'] => time()], [$CNF['FIELD_ID'] => $this->getId()]);
  28. return $mixedResult;
  29. }
  30. }
  31. /** @} */