Commit 7b345567 authored by Frédéric Buclin's avatar Frédéric Buclin

Bug 848635: Old queries based on tags are no longer listed in the page footer by…

Bug 848635: Old queries based on tags are no longer listed in the page footer by default when upgrading from 4.0 or older to 4.2 r=glob a=LpSolit
parent 048314a6
...@@ -3581,9 +3581,6 @@ sub _migrate_user_tags { ...@@ -3581,9 +3581,6 @@ sub _migrate_user_tags {
VALUES (?, ?)'); VALUES (?, ?)');
my $sth_nq = $dbh->prepare('UPDATE namedqueries SET query = ? my $sth_nq = $dbh->prepare('UPDATE namedqueries SET query = ?
WHERE id = ?'); WHERE id = ?');
my $sth_nq_footer = $dbh->prepare(
'DELETE FROM namedqueries_link_in_footer
WHERE user_id = ? AND namedquery_id = ?');
if (scalar @$tags) { if (scalar @$tags) {
print install_string('update_queries_to_tags'), "\n"; print install_string('update_queries_to_tags'), "\n";
...@@ -3623,13 +3620,11 @@ sub _migrate_user_tags { ...@@ -3623,13 +3620,11 @@ sub _migrate_user_tags {
next if !$bug_id; next if !$bug_id;
$sth_bug_tag->execute($bug_id, $tag_id); $sth_bug_tag->execute($bug_id, $tag_id);
} }
# Existing tags may be used in whines, or shared with # Existing tags may be used in whines, or shared with
# other users. So we convert them rather than delete them. # other users. So we convert them rather than delete them.
$uri->query_param('tag', $tag_name); $uri->query_param('tag', $tag_name);
$sth_nq->execute($uri->query, $query_id); $sth_nq->execute($uri->query, $query_id);
# But we don't keep showing them in the footer.
$sth_nq_footer->execute($user_id, $query_id);
} }
$dbh->bz_commit_transaction(); $dbh->bz_commit_transaction();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment