From 3f2b4a9a200023d9a2cbc531434fe9080a1f60ca Mon Sep 17 00:00:00 2001 From: Ruslan Kabalin Date: Sat, 22 Jul 2023 10:23:42 +0100 Subject: [PATCH] Fix reputation sync Step 6 is supposed to use rep_id as reference for processing chunk size, since it uses max rep_id for loop control. rep_to may refer to user ID that exceeds rep_id, thus some users will left unprocessed. --- root/includes/acp/acp_reputation.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/root/includes/acp/acp_reputation.php b/root/includes/acp/acp_reputation.php index 615fb78..1bf1137 100644 --- a/root/includes/acp/acp_reputation.php +++ b/root/includes/acp/acp_reputation.php @@ -311,8 +311,8 @@ function main($id, $mode) $sql = 'SELECT SUM(point) AS total_points, rep_to FROM ' . REPUTATIONS_TABLE . ' WHERE action != 5 - AND rep_to >= ' . ($start + 1) . ' - AND rep_to <= ' . ($start + $this->step) . ' + AND rep_id >= ' . ($start + 1) . ' + AND rep_id <= ' . ($start + $this->step) . ' GROUP BY rep_to'; $result = $db->sql_query($sql);