{'user'} eq $user ? $remote : LJ::load_user($user); unless ($u) { $body = ""; return; } LJ::load_user_props($u, "opt_blockrobots") if $u->{'statusvis'} eq 'V'; if ($u->{'statusvis'} ne 'V' || $u->{'opt_blockrobots'}) { $head .= LJ::robot_meta_tags(); } # no need for viewsome, due to the fact that none of this is private anyway. just # allow anybody with any version of viewall to see userpics for non-V statusvis users if ($GET{viewall} && LJ::check_priv($remote, 'canview')) { LJ::statushistory_add($u->{'userid'}, $remote->{'userid'}, "viewall", "allpics: $u->{'user'}, statusvis: $u->{'statusvis'}"); } else { if ($u->{'statusvis'} eq "S") { $title = $ML{'error.suspended.title'}; $body = " LJ::ljuser($u), 'sitename' => $LJ::SITENAME }) . " p?>"; return; } if ($u->{'statusvis'} eq "D") { $title = $ML{'error.deleted.title'}; $body = " LJ::ljuser($u) }) . " p?>"; return; } if ($u->{'statusvis'} eq "X") { $title = $ML{'error.purged.title'}; $body = " LJ::ljuser($u) }) . " p?>"; return; } } # redirect renamed users if ($u->{'journaltype'} eq "R") { LJ::load_user_props($u, "renamedto"); return BML::redirect("$LJ::SITEROOT/allpics.bml?user=$u->{'renamedto'}") if $u->{'renamedto'}; } my ($can_manage, $getextra); if ($remote) { $can_manage = LJ::can_manage($remote, $u->{'userid'}); $getextra = $can_manage && $remote->{'user'} ne $u->{'user'} ? "?authas=$u->{'user'}" : ''; } #### show pictures my $info = LJ::get_userpic_info($u, {'load_comments' => 1, 'load_urls' => 1}); my %keywords = (); while (my ($kw, $pic) = each %{$info->{'kw'}}) { LJ::text_out(\$kw); push @{$keywords{$pic->{'picid'}}}, $kw; } my %comments = (); while (my ($pic, $comment) = each %{$info->{'comment'}}) { LJ::text_out(\$comment); $comments{$pic} = $comment; } my $piccount = 0; my @pics; my $defaultpicid = $u ? $u->{'defaultpicid'} : undef; push @pics, $info->{'pic'}->{$u->{'defaultpicid'}} if $defaultpicid; push @pics, map { $info->{'pic'}->{$_} } sort { $a <=> $b } grep { $_ != $defaultpicid && ($info->{'pic'}->{$_}->{'state'} eq 'N' || $can_manage) && $info->{'pic'}->{$_}->{'state'} ne 'X' } keys %{$info->{'pic'}}; foreach my $pic (@pics) { if ($piccount++ == 0) { $body .= " LJ::ljuser($u)}); if ($can_manage) { $body .= ' ' . BML::ml('.edit2', { 'editlink' => "$LJ::SITEROOT/editpics.bml$getextra", 'uploadlink' => "$LJ::SITEROOT/editpics.bml$getextra#upload" }); } $body .= " p?>
"; my ($apre, $apost); if ($pic->{'url'}) { $apre = ""; $apost = ""; } $body .= "$apre{'userid'}' "; $body .= "width='$pic->{'width'}' height='$pic->{'height'}' alt='' border='0'/>$apost | ";
if ($u->{'defaultpicid'} == $pic->{'picid'}) {
$body .= "$ML{'.default'} "; } if ($can_manage && $pic->{'state'} eq 'I') { $body .= "[$ML{'userpic.inactive'}] " . LJ::help_icon('userpic_inactive') . " "; } if ($eh_keywords) { $body .= "$ML{'.keywords'} $eh_keywords "; } # Comments my $eh_comments = $comments{$pic->{'picid'}}; if ($eh_comments) { LJ::CleanHTML::clean(\$eh_comments, { 'wordlength' => 40, 'addbreaks' => 0, 'tablecheck' => 1, 'mode' => 'deny', }); $body .= "$eh_comments\n"; } $body .= " | ";
if ($piccount % 2 == 1) {
$body .= ""; } else { $body .= " | "; } $body .= " |