From: Don Armstrong <don@donarmstrong.com>
Date: Thu, 6 Aug 2009 15:58:43 +0000 (-0700)
Subject: don't alter archived bugs in control
X-Git-Tag: release/2.6.0~456^2~7
X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=d059e46de9b45b8881b61fc41ff6106b69c19cac;p=debbugs.git

don't alter archived bugs in control
---

diff --git a/Debbugs/Control.pm b/Debbugs/Control.pm
index a36321a4..c80a3ce0 100644
--- a/Debbugs/Control.pm
+++ b/Debbugs/Control.pm
@@ -2685,6 +2685,13 @@ sub __begin_control {
     if (not @data) {
 	die "Unable to read any bugs successfully.";
     }
+    if (not $param{archived}) {
+	for my $data (@data) {
+	    if ($data->{archived}) {
+		die "Not altering archived bugs; see unarchive.";
+	    }
+	}
+    }
     if (not __check_limit(data => \@data,
 			  exists $param{limit}?(limit => $param{limit}):(),
 			 )) {