BxDolCmtsVoteLikes.php 696 B

1234567891011121314151617181920212223242526
  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 UnaCore UNA Core
  7. * @{
  8. */
  9. class BxDolCmtsVoteLikes extends BxTemplVoteLikes
  10. {
  11. function __construct($sSystem, $iId, $iInit = true, $oTemplate = false)
  12. {
  13. parent::__construct($sSystem, $iId, $iInit, $oTemplate);
  14. }
  15. protected function _isAllowedVoteByObject($aObject)
  16. {
  17. $oCmts = BxDolCmts::getObjectInstanceByUniqId($aObject['id'], true, $this->_oTemplate);
  18. if(!$oCmts)
  19. return false;
  20. return $oCmts->isViewAllowed() === CHECK_ACTION_RESULT_ALLOWED;
  21. }
  22. }
  23. /** @} */