Committer: gprochaev
LJSUP-7457. Add trim the comm_titleU trunk/cgi-bin/LJ/Widget/Browse.pm
Modified: trunk/cgi-bin/LJ/Widget/Browse.pm =================================================================== --- trunk/cgi-bin/LJ/Widget/Browse.pm 2010-11-26 05:20:22 UTC (rev 17794) +++ trunk/cgi-bin/LJ/Widget/Browse.pm 2010-11-26 05:28:16 UTC (rev 17795) @@ -209,6 +209,8 @@ my $secondsold = $comm->timeupdate ? time() - $comm->timeupdate : undef; my $userpic = $comm->userpic ? $comm->userpic->imgtag_percentagesize(1) : ''; + my $descr = $comm->prop('comm_theme') || ''; + my $descr_trimmed = LJ::html_trim($descr, 50); push @tmpl_communities, { @@ -218,7 +220,8 @@ journal_user => $comm->{user}, journal_base => $comm->journal_base(), journal_title => $comm->{'name'} || '', - journal_subtitle => $comm->prop('comm_theme') || '', + journal_subtitle => $descr_trimmed, + is_subtitle_trimmed => $descr ne $descr_trimmed ? 1 : 0, updated_ago => LJ::TimeUtil->ago_text($secondsold), }; }