mirror of
https://github.com/Oreolek/ifhub.club.git
synced 2024-06-28 20:45:00 +03:00
Fix vote time limitation.
This commit is contained in:
parent
3e4cd98cbb
commit
039d24f65f
|
@ -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();
|
||||
|
|
|
@ -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();
|
||||
|
|
Loading…
Reference in a new issue