]> git.donarmstrong.com Git - debbugs.git/commitdiff
* Fix the Debbugs::Control bug regex
authorDon Armstrong <don@donarmstrong.com>
Tue, 3 Jul 2007 08:37:01 +0000 (01:37 -0700)
committerDon Armstrong <don@donarmstrong.com>
Tue, 3 Jul 2007 08:37:01 +0000 (01:37 -0700)
 * Fix $_ thinko in bug_archiveable

Debbugs/Control.pm
Debbugs/Status.pm

index fe25f6fe0ef1848c019c9b49fd9b5b5a2a1c0821..859d5e8d2067f87a7c7b3f3bed21038df65cfb72 100644 (file)
@@ -161,7 +161,7 @@ This routine archives a bug
 sub bug_archive {
      my %param = validate_with(params => \@_,
                               spec   => {bug => {type   => SCALAR,
-                                                 regex  => qr/^\d+/,
+                                                 regex  => qr/^\d+$/,
                                                 },
                                          check_archiveable => {type => BOOLEAN,
                                                                default => 1,
index 7dedda2de548fcb8b098a20b5f4d30012004be1f..ce58e9903d3ca2988d124bc365c7a834f9427acd 100644 (file)
@@ -627,7 +627,7 @@ sub bug_archiveable{
      return $cannot_archive if not defined $status->{done} or not length $status->{done};
      # If we just are checking if the bug can be archived, we'll not even bother
      # checking the versioning information if the bug has been -done for less than 28 days.
-     my $log_file = getbugcomponent($_,'log');
+     my $log_file = getbugcomponent($param{bug},'log');
      if (not defined $log_file) {
          print STDERR "Cannot archive $param{bug} because the log doesn't exists\n" if $DEBUG;
      }