Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

K6.4 #9752

Merged
merged 11 commits into from
Oct 8, 2024
Prev Previous commit
Next Next commit
change wrong and duplicate name stars to rate in KunenaRate
Signed-off-by: Sven Schultschik <sven@schultschik.de>
  • Loading branch information
svanschu committed Oct 7, 2024
commit 3338e52814db4592f2538d7214c551cc3d34efde
10 changes: 2 additions & 8 deletions src/libraries/kunena/src/Forum/Topic/Rate/KunenaRate.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ class KunenaRate
* @var integer
* @since Kunena 6.0
*/
public $stars = 0;
public $rate = 0;

/**
* @var null
Expand All @@ -60,12 +60,6 @@ class KunenaRate
*/
public $time = null;

/**
* @var integer
* @since Kunena 6.0
*/
public $rate;

/**
* @var boolean
* @since Kunena 6.0
Expand Down Expand Up @@ -228,7 +222,7 @@ public function save(KunenaUser $user)
$values = [
$this->_db->quote($this->topic_id),
$this->_db->quote($user->userid),
$this->_db->quote($this->stars),
$this->_db->quote($this->rate),
$this->_db->quote($time->toSQL()),
];

Expand Down
2 changes: 1 addition & 1 deletion src/site/src/Controllers/TopicController.php
Original file line number Diff line number Diff line change
Expand Up @@ -432,7 +432,7 @@ public function setrate()

if ($user->exists() || $this->config->ratingEnabled) {
$rate = KunenaRateHelper::get($topicid);
$rate->stars = $starid;
$rate->rate = $starid;
$rate->topic_id = $topicid;

$response = $rate->save($this->me);
Expand Down
2 changes: 1 addition & 1 deletion src/site/src/View/Topic/view.raw.php
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@ public function displayRate($tpl = null)

if ($user->exists() || $this->config->ratingEnabled) {
$rate = KunenaRateHelper::get($topicid);
$rate->stars = $starid;
$rate->rate = $starid;
$rate->topic_id = $topicid;

$response = $rate->save($this->me);
Expand Down
Loading