Skip to content

Commit

Permalink
Merge pull request #8267 from Sesquipedalian/2.1/likes_insert_ignore
Browse files Browse the repository at this point in the history
Uses INSERT IGNORE when adding a like to the database
  • Loading branch information
Sesquipedalian authored Jul 1, 2024
2 parents 2151aae + 2bc940e commit 6996e04
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Sources/Likes.php
Original file line number Diff line number Diff line change
Expand Up @@ -344,7 +344,7 @@ protected function insert()
call_integration_hook('integrate_issue_like_before', array(&$type, &$content, &$user, &$time));

// Insert the like.
$smcFunc['db_insert']('insert',
$smcFunc['db_insert']('ignore',
'{db_prefix}user_likes',
array('content_id' => 'int', 'content_type' => 'string-6', 'id_member' => 'int', 'like_time' => 'int'),
array($content, $type, $user['id'], $time),
Expand Down

0 comments on commit 6996e04

Please sign in to comment.