Skip to content

Commit

Permalink
Fix reputation sync
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
kabalin committed Jul 22, 2023
1 parent e428056 commit 3f2b4a9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions root/includes/acp/acp_reputation.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit 3f2b4a9

Please sign in to comment.