mirror of
https://github.com/torrentpier/torrentpier
synced 2025-08-20 21:33:54 -07:00
Vote: Use REPLACE INTO instead of INSERT IGNORE INTO (#1145)
* Vote: Use REPLACE INTO instead INSERT IGNORE INTO * Update CHANGELOG.md
This commit is contained in:
parent
fc1500f9d9
commit
b78b303c4b
2 changed files with 2 additions and 2 deletions
|
@ -5,6 +5,7 @@
|
||||||
|
|
||||||
**Merged pull requests:**
|
**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 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))
|
- 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))
|
- Removed topic watch useless code [\#1137](https://github.com/torrentpier/torrentpier/pull/1137) ([belomaxorka](https://github.com/belomaxorka))
|
||||||
|
|
|
@ -32,8 +32,7 @@ switch ($mode) {
|
||||||
|
|
||||||
$columns = 'topic_id, user_id, time';
|
$columns = 'topic_id, user_id, time';
|
||||||
$values = "$topic_id, {$userdata['user_id']}, " . TIMENOW;
|
$values = "$topic_id, {$userdata['user_id']}, " . TIMENOW;
|
||||||
DB()->query('INSERT IGNORE INTO ' . BB_THX . " ($columns) VALUES ($values)");
|
DB()->query('REPLACE INTO ' . BB_THX . " ($columns) VALUES ($values)");
|
||||||
|
|
||||||
$this->response['html'] = '<b>' . profile_url($userdata) . ' <i>(' . bb_date(TIMENOW) . ')</i></b>';
|
$this->response['html'] = '<b>' . profile_url($userdata) . ' <i>(' . bb_date(TIMENOW) . ')</i></b>';
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue