From: lpsolit%gmail.com <> Date: Mon, 10 Apr 2006 01:23:42 +0000 (+0000) Subject: Bug 332705: Taking a bug when posting a new attachment doesn't update the 'duplicates... X-Git-Tag: bugzilla-2.23.1~19 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=82982fbd12c68697d89d091385195f3622a144d0;p=thirdparty%2Fbugzilla.git Bug 332705: Taking a bug when posting a new attachment doesn't update the 'duplicates' table - Patch by Frédéric Buclin r=wicked a=justdave --- diff --git a/attachment.cgi b/attachment.cgi index 1fd3c19943..fbf04e597a 100755 --- a/attachment.cgi +++ b/attachment.cgi @@ -1069,7 +1069,11 @@ sub insert SendSQL("UPDATE bugs SET delta_ts = $sql_timestamp, " . join(", ", map("$fields[$_] = $newvalues[$_]", (0..3))) . " WHERE bug_id = $bugid"); - + + # If the bug was a dupe, we have to remove its entry from the + # 'duplicates' table. + $dbh->do('DELETE FROM duplicates WHERE dupe = ?', undef, $bugid); + # We store email addresses in the bugs_activity table rather than IDs. $oldvalues[0] = $oldvalues[4]; $newvalues[0] = $newvalues[4];