BxDolVoting::makeVote PHP Method

makeVote() public method

public makeVote ( $iVote )
    function makeVote($iVote)
    {
        if (!$this->isEnabled() || $this->isDublicateVote() || !$this->checkAction()) {
            return false;
        }
        if ($this->_sSystem == 'profile' && $this->getId() == getLoggedId()) {
            return false;
        }
        $sVoterIdentification = isLogged() ? getLoggedId() : getVisitorIP();
        if (!$this->_oQuery->putVote($this->getId(), $sVoterIdentification, $iVote)) {
            return false;
        }
        $this->checkAction(true);
        $this->_triggerVote();
        $oZ = new BxDolAlerts($this->_sSystem, 'rate', $this->getId(), getLoggedId(), array('rate' => $iVote));
        $oZ->alert();
        return true;
    }