]> git.donarmstrong.com Git - debbugs.git/blobdiff - Debbugs/SOAP.pm
merge changes from dla source tree
[debbugs.git] / Debbugs / SOAP.pm
index cfe74bbf0c43cc4c5d63f7bd406b139cb6e9cab4..ebb96668b894bb770e6e2e1357dafe22e16c7190 100644 (file)
@@ -138,6 +138,22 @@ sub get_bugs{
      return \@bugs;
 }
 
+=head2 newest_bugs
+
+     my @bugs = newest_bugs(5);
+
+Returns a list of the newest bugs. [Note that all bugs are *not*
+guaranteed to exist, but they should in the most common cases.]
+
+=cut
+
+sub newest_bugs{
+     my $VERSION = __populate_version(pop);
+     my ($self,$num) = @_;
+     my $newest_bug = Debbugs::bugs::newest_bug();
+     return [($newest_bug - $num + 1) .. $newest_bug];
+
+}
 
 =head2 get_bug_log
 
@@ -192,9 +208,8 @@ sub get_bug_log{
          next if defined $msg_id and $msg_id =~ /handler\..+\.ack(?:info)?\@/;
          my $message = parse($record->{text});
          my ($header,$body) = map {join("\n",make_list($_))}
-              values %{$message};
-         push @messages,{html => $record->{html},
-                         header => $header,
+              @{$message}{qw(header body)};
+         push @messages,{header => $header,
                          body   => $body,
                          attachments => [],
                          msg_num => $current_msg,