[livejournal] r18101: LJSUP-7774. SuperMaintainer lost this ri...
Committer: gprochaev
LJSUP-7774. SuperMaintainer lost this rightsU trunk/cgi-bin/LJ/User.pm U trunk/cgi-bin/weblib.pl
Modified: trunk/cgi-bin/LJ/User.pm
===================================================================
--- trunk/cgi-bin/LJ/User.pm 2011-01-25 08:46:20 UTC (rev 18100)
+++ trunk/cgi-bin/LJ/User.pm 2011-01-25 08:57:47 UTC (rev 18101)
@@ -6080,8 +6080,17 @@
# Two valid types, Personal or Community
$opts->{'type'} = undef unless $opts->{'type'} =~ m/^(P|C|S)$/;
- my $ids = LJ::load_rel_target($u, $opts->{'type'} eq 'S' ? 'S' : 'A');
+ my $ids = [];
+ my $a_ids = LJ::load_rel_target($u, 'A');
+ my $s_ids = LJ::load_rel_target($u, 'S');
+ if ($opts->{'type'} eq 'S') {
+ push @$ids, @$s_ids;
+ } else {
+ push @$ids, @$s_ids;
+ push @$ids, @$a_ids;
+ }
return undef unless $ids;
+ $opts->{'type'} = 'C' if $opts->{'type'} eq 'S';
# load_userids_multiple
my %users;
@@ -6089,7 +6098,7 @@
return map { $_->{'user'} }
grep { ! $opts->{'cap'} || LJ::get_cap($_, $opts->{'cap'}) }
- grep { ! ($opts->{'type'} && $opts->{'type'} ne 'S') || $opts->{'type'} eq $_->{'journaltype'} }
+ grep { ! $opts->{'type'} || $opts->{'type'} eq $_->{'journaltype'} }
# unless overridden, hide non-visible/non-read-only journals. always display the user's acct
grep { $opts->{'showall'} || $_->is_visible || $_->is_readonly || LJ::u_equals($_, $u) }
Modified: trunk/cgi-bin/weblib.pl
===================================================================
--- trunk/cgi-bin/weblib.pl 2011-01-25 08:46:20 UTC (rev 18100)
+++ trunk/cgi-bin/weblib.pl 2011-01-25 08:57:47 UTC (rev 18101)
@@ -178,7 +178,6 @@
die "make_authas_select called outside of web context"
unless LJ::is_web_context();
- $opts->{type} = 'S' unless $opts->{type};
my @list = LJ::get_authas_list($u, $opts);
# only do most of form if there are options to select from
