From d9094d1524fcda39b7c085910ff9d565ff422bb4 Mon Sep 17 00:00:00 2001 From: Roman Kelesidis Date: Tue, 21 Nov 2023 08:29:11 +0700 Subject: [PATCH] Revert "Vote: Use REPLACE INTO instead of INSERT IGNORE INTO (#1145)" This reverts commit b78b303c4bfce3b9096809f6abd2ffe764f7ef55. --- CHANGELOG.md | 1 - library/ajax/thanks.php | 3 ++- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 259d1ce12..bde7a3ea1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,7 +5,6 @@ **Merged pull requests:** -- Vote: Use REPLACE INTO instead of INSERT IGNORE INTO [\#1145](https://github.com/torrentpier/torrentpier/pull/1145) ([belomaxorka](https://github.com/belomaxorka)) - Vote button code improvements [\#1140](https://github.com/torrentpier/torrentpier/pull/1140), [\#1142](https://github.com/torrentpier/torrentpier/pull/1142), [\#1143](https://github.com/torrentpier/torrentpier/pull/1143) ([belomaxorka](https://github.com/belomaxorka)) - Vote button and v2 file list topic url display [\#1138](https://github.com/torrentpier/torrentpier/pull/1138) ([kovalensky](https://github.com/kovalensky)) - Removed topic watch useless code [\#1137](https://github.com/torrentpier/torrentpier/pull/1137) ([belomaxorka](https://github.com/belomaxorka)) diff --git a/library/ajax/thanks.php b/library/ajax/thanks.php index 146c80f41..d3f6d8ccf 100644 --- a/library/ajax/thanks.php +++ b/library/ajax/thanks.php @@ -32,7 +32,8 @@ switch ($mode) { $columns = 'topic_id, user_id, time'; $values = "$topic_id, {$userdata['user_id']}, " . TIMENOW; - DB()->query('REPLACE INTO ' . BB_THX . " ($columns) VALUES ($values)"); + DB()->query('INSERT IGNORE INTO ' . BB_THX . " ($columns) VALUES ($values)"); + $this->response['html'] = '' . profile_url($userdata) . ' (' . bb_date(TIMENOW) . ')'; break;