diff options
author | Stephanie Daugherty <sdaugherty@gmail.com> | 2011-08-29 23:29:30 +0200 |
---|---|---|
committer | Max Kanat-Alexander <mkanat@bugzilla.org> | 2011-08-29 23:29:30 +0200 |
commit | 8e5e72fccecb5ad778188d0d3a807cc5c0c0ac7c (patch) | |
tree | 0a846f335e338fcb7a38db932e3217095d9f03c9 /Bugzilla/Bug.pm | |
parent | dd0e1c27011f13edc0083078ebef7d061822cff7 (diff) | |
download | bugzilla-8e5e72fccecb5ad778188d0d3a807cc5c0c0ac7c.tar.gz bugzilla-8e5e72fccecb5ad778188d0d3a807cc5c0c0ac7c.tar.xz |
Bug 637648 - Rename the "tags" table to "tag"
r=LpSolit, a=LpSolit
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 73648f233..7745a9809 100644 --- a/Bugzilla/Bug.pm +++ b/Bugzilla/Bug.pm @@ -2958,10 +2958,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. @@ -2997,7 +2997,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. @@ -3014,7 +3014,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)); } |