]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
adding toArrayOfStrings subroutine needed by Bug.pm
authorendico%mozilla.org <>
Tue, 13 Jun 2000 16:45:12 +0000 (16:45 +0000)
committerendico%mozilla.org <>
Tue, 13 Jun 2000 16:45:12 +0000 (16:45 +0000)
Bugzilla/RelationSet.pm
RelationSet.pm

index ee402e7a4b11c5894814df49d2b5b5cf1001f261..92e2158f229d070b39fd4a51b5863781b71f846d 100644 (file)
@@ -196,6 +196,20 @@ sub toArray {
   return keys(%$self);
 }
 
+# return this set as an array of strings
+#
+sub toArrayOfStrings {
+  ($#_ == 0) || confess("invalid number of arguments");
+  my $self = shift();
+
+  my @result = ();
+  foreach my $i ( keys %$self ) {
+    push @result, &::DBID_to_name($i);
+  }
+
+  return sort(@result);
+}  
+
 # return this set in string form (comma-separated and sorted)
 #
 sub toString {
index ee402e7a4b11c5894814df49d2b5b5cf1001f261..92e2158f229d070b39fd4a51b5863781b71f846d 100644 (file)
@@ -196,6 +196,20 @@ sub toArray {
   return keys(%$self);
 }
 
+# return this set as an array of strings
+#
+sub toArrayOfStrings {
+  ($#_ == 0) || confess("invalid number of arguments");
+  my $self = shift();
+
+  my @result = ();
+  foreach my $i ( keys %$self ) {
+    push @result, &::DBID_to_name($i);
+  }
+
+  return sort(@result);
+}  
+
 # return this set in string form (comma-separated and sorted)
 #
 sub toString {