From 039d24f65f2f2998977499e917807be7bfebf520 Mon Sep 17 00:00:00 2001 From: Alexey Kachayev Date: Fri, 21 Aug 2009 11:30:55 +0000 Subject: [PATCH] Fix vote time limitation. --- include/ajax/voteComment.php | 2 +- include/ajax/voteTopic.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/include/ajax/voteComment.php b/include/ajax/voteComment.php index be524dcb..befb9ae8 100644 --- a/include/ajax/voteComment.php +++ b/include/ajax/voteComment.php @@ -33,7 +33,7 @@ if ($oEngine->User_IsAuthorization()) { $oUserCurrent=$oEngine->User_GetUserCurrent(); if ($oComment->getUserId()!=$oUserCurrent->getId()) { if (!($oTopicCommentVote=$oEngine->Vote_GetVote($oComment->getId(),'comment',$oUserCurrent->getId()))) { - if (strtotime($oComment->getDate())>time()-VOTE_LIMIT_TIME_COMMENT) { + if (strtotime($oComment->getDate())>time()-Config::Get('acl.vote.comment.limit_time')) { if ($oEngine->ACL_CanVoteComment($oUserCurrent,$oComment)) { if (in_array($iValue,array('1','-1'))) { $oTopicCommentVote=new VoteEntity_Vote(); diff --git a/include/ajax/voteTopic.php b/include/ajax/voteTopic.php index db90562c..2fe8ce9c 100644 --- a/include/ajax/voteTopic.php +++ b/include/ajax/voteTopic.php @@ -33,7 +33,7 @@ if ($oEngine->User_IsAuthorization()) { $oUserCurrent=$oEngine->User_GetUserCurrent(); if ($oTopic->getUserId()!=$oUserCurrent->getId()) { if (!($oTopicVote=$oEngine->Vote_GetVote($oTopic->getId(),'topic',$oUserCurrent->getId()))) { - if (strtotime($oTopic->getDateAdd())>time()-VOTE_LIMIT_TIME_TOPIC) { + if (strtotime($oTopic->getDateAdd())>time()-Config::Get('acl.vote.topic.limit_time')) { if ($oEngine->ACL_CanVoteTopic($oUserCurrent,$oTopic) or $iValue==0) { if (in_array($iValue,array('1','-1','0'))) { $oTopicVote=new VoteEntity_Vote();