BxDolVoteStars.php 773 B

1234567891011121314151617181920212223242526272829303132
  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. /**
  10. * Star based votes for any content
  11. */
  12. class BxDolVoteStars extends BxTemplVote
  13. {
  14. public function __construct($sSystem, $iId, $iInit = true, $oTemplate = false)
  15. {
  16. parent::__construct($sSystem, $iId, $iInit, $oTemplate);
  17. $this->_oQuery = new BxDolVoteStarsQuery($this);
  18. $this->_sType = BX_DOL_VOTE_TYPE_STARS;
  19. }
  20. /**
  21. * Internal functions
  22. */
  23. protected function _isDuplicate($iObjectId, $iAuthorId, $iAuthorIp, $bVoted)
  24. {
  25. return !$this->_oQuery->isPostTimeoutEnded($iObjectId, $iAuthorIp);
  26. }
  27. }
  28. /** @} */