[Cpan-forum-commit] rev 144 - branches/db_changes/lib/CPAN
svn at pti.co.il
svn at pti.co.il
Fri Mar 25 10:43:16 IST 2005
Author: gabor
Date: 2005-03-25 10:43:15 +0200 (Fri, 25 Mar 2005)
New Revision: 144
Modified:
branches/db_changes/lib/CPAN/Forum.pm
Log:
replace array with has in the _subscription call to avoid duplicates
Modified: branches/db_changes/lib/CPAN/Forum.pm
===================================================================
--- branches/db_changes/lib/CPAN/Forum.pm 2005-03-25 08:38:36 UTC (rev 143)
+++ branches/db_changes/lib/CPAN/Forum.pm 2005-03-25 08:43:15 UTC (rev 144)
@@ -1635,16 +1635,14 @@
sub _subscriptions {
my ($self, $t, $gid) = @_;
-
- my @people;
- my (@subs) = CPAN::Forum::Subscriptions->search(gid => $gid);
- foreach my $s (@subs) {
- push @people, {
+ my %people;
+ foreach my $s (CPAN::Forum::Subscriptions->search(gid => $gid)) {
+ $people{$s->uid} = {
username => $s->uid->username,
};
}
- if (@people) {
- $t->param(users => \@people);
+ if (%people) {
+ $t->param(users => [values %people]);
}
}
More information about the Cpan-forum-commit
mailing list