{'user'} : $user; my $styu = LJ::load_user($user); my $styles; if ($user eq 'system') { $styles = LJ::S1::get_public_styles(); } else { $styles = LJ::S1::get_user_styles($user); } my $admin = $remote && (LJ::check_priv($remote, 'canview', 'styles') || LJ::check_priv($remote, 'canview', '*')); my ($dday,$dmon,$dyear) = (localtime(time))[3..5]; $dyear+=1900; $dmon++; my %extra = ( 'day' => "&month=$dmon&day=$dday&year=$dyear" ); my $ret = "Styles for " . LJ::ljuser($user) . ":

"; my $last; STY: foreach my $sty (sort { $a->{'type'} cmp $b->{'type'} || $a->{'styledes'} cmp $b->{'styledes'} } values %$styles) { next STY unless $sty->{is_public} eq 'Y' || # public is always visible LJ::u_equals($remote, $styu) || # yours are visible to you LJ::can_manage($remote, $styu) ||# you can view things you manage $admin; # you have appropriate canview if ($last ne $LJ::viewinfo{$sty->{'type'}}->{'des'}) { $last = $LJ::viewinfo{$sty->{'type'}}->{'des'}; $ret .= "$last
\n"; } $ret .= "  [info] "; $ret .= " link: htdocs/styles/browse/styleinfo.bml, htdocs/customview.cgi _c?>