From 596e2e38aa94189a988b26d6629694f88a40a496 Mon Sep 17 00:00:00 2001 From: mambax7 Date: Fri, 12 Feb 2021 17:28:59 -0500 Subject: [PATCH] add votetype --- class/Ratings.php | 1 + class/Vote.php | 1 + vote.php | 1 + 3 files changed, 3 insertions(+) diff --git a/class/Ratings.php b/class/Ratings.php index aa8b6085..8aea7911 100644 --- a/class/Ratings.php +++ b/class/Ratings.php @@ -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; } diff --git a/class/Vote.php b/class/Vote.php index 51f52725..f4aee822 100644 --- a/class/Vote.php +++ b/class/Vote.php @@ -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); } /** diff --git a/vote.php b/vote.php index bf695d07..82cfee03 100644 --- a/vote.php +++ b/vote.php @@ -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);