Skip to content

Commit

Permalink
add votetype
Browse files Browse the repository at this point in the history
  • Loading branch information
mambax7 committed Feb 12, 2021
1 parent 9c0f11b commit 596e2e3
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions class/Ratings.php
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ public function getValuesRatings($keys = null, $format = null, $maxDepth = null)
$ret['uid'] = \XoopsUser::getUnameFromId($this->getVar('rate_uid'));
$ret['ip'] = $this->getVar('rate_ip');
$ret['date'] = \formatTimestamp($this->getVar('rate_date'), 's');
$ret['votetype'] = $this->getVar('votetype');

return $ret;
}
Expand Down
1 change: 1 addition & 0 deletions class/Vote.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ public function __construct()
$this->initVar('uid', \XOBJ_DTYPE_INT);
$this->initVar('ip', \XOBJ_DTYPE_TXTBOX);
$this->initVar('date', \XOBJ_DTYPE_INT);
$this->initVar('votetype', \XOBJ_DTYPE_INT);
}

/**
Expand Down
1 change: 1 addition & 0 deletions vote.php
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,7 @@
$voteObj->setVar('uid', $itemRating['uid']);
$voteObj->setVar('ip', $itemRating['ip']);
$voteObj->setVar('date', \time());
$voteObj->setVar('votetype', $votingType);
// Insert Data
if ($voteHandler->insert($voteObj)) {
unset($voteObj);
Expand Down

0 comments on commit 596e2e3

Please sign in to comment.