diff options
Diffstat (limited to 'Bugzilla/Bug.pm')
-rw-r--r-- | Bugzilla/Bug.pm | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Bugzilla/Bug.pm b/Bugzilla/Bug.pm index 6fdab3645..8beecdcd2 100644 --- a/Bugzilla/Bug.pm +++ b/Bugzilla/Bug.pm @@ -2918,10 +2918,10 @@ sub add_tag { my $tag_id = $user->tags->{$tag}->{id}; # If this tag doesn't exist for this user yet, create it. if (!$tag_id) { - $dbh->do('INSERT INTO tags (user_id, name) VALUES (?, ?)', + $dbh->do('INSERT INTO tag (user_id, name) VALUES (?, ?)', undef, ($user->id, $tag)); - $tag_id = $dbh->selectrow_array('SELECT id FROM tags + $tag_id = $dbh->selectrow_array('SELECT id FROM tag WHERE name = ? AND user_id = ?', undef, ($tag, $user->id)); # The list has changed. @@ -2957,7 +2957,7 @@ sub remove_tag { # Decrement the counter, and delete the tag if no bugs are using it anymore. if (!--$user->tags->{$tag}->{bug_count}) { - $dbh->do('DELETE FROM tags WHERE name = ? AND user_id = ?', + $dbh->do('DELETE FROM tag WHERE name = ? AND user_id = ?', undef, ($tag, $user->id)); # The list has changed. @@ -2974,7 +2974,7 @@ sub tags { if (!exists $self->{tags}) { $self->{tags} = $dbh->selectcol_arrayref( 'SELECT name FROM bug_tag - INNER JOIN tags ON tags.id = bug_tag.tag_id + INNER JOIN tag ON tag.id = bug_tag.tag_id WHERE bug_id = ? AND user_id = ?', undef, ($self->id, $user->id)); } |