mirror of
https://github.com/lkddi/nexusphp.git
synced 2026-04-05 07:20:58 +08:00
fix can not remove all tags
This commit is contained in:
@@ -5311,6 +5311,9 @@ function insert_torrent_tags($torrentId, $tagIdArr, $sync = false)
|
||||
if ($sync) {
|
||||
sql_query("delete from torrent_tags where torrent_id = $torrentId");
|
||||
}
|
||||
if (empty($tagIdArr)) {
|
||||
return;
|
||||
}
|
||||
$insertTagsSql = 'insert into torrent_tags (`torrent_id`, `tag_id`, `created_at`, `updated_at`) values ';
|
||||
$values = [];
|
||||
foreach ($tagIdArr as $tagId) {
|
||||
|
||||
Reference in New Issue
Block a user