Committer: afedorov
OPSC-173: Implement expanding lj user tags and lj-app tag when show activities in LJ.com web interface.U trunk/cgi-bin/cleanhtml.pl
Modified: trunk/cgi-bin/cleanhtml.pl =================================================================== --- trunk/cgi-bin/cleanhtml.pl 2010-11-16 10:25:39 UTC (rev 17703) +++ trunk/cgi-bin/cleanhtml.pl 2010-11-16 11:14:30 UTC (rev 17704) @@ -52,7 +52,6 @@ # 'keepcomments' => 1, # 'cuturl' => 'http://www.domain.com/full_item_view.ext', # 'ljcut_disable' => 1, # stops the cleaner from using the lj-cut tag -# 'ljapp_enable' => 1, # start using the lj-app tag # 'cleancss' => 1, # 'extractlinks' => 1, # remove a hrefs; implies noautolinks # 'noautolinks' => 1, # do not auto linkify @@ -134,7 +133,6 @@ my $undefined_tags = $opts->{undefined_tags} || ''; my $cut = $opts->{'cuturl'} || $opts->{'cutpreview'}; my $ljcut_disable = $opts->{'ljcut_disable'}; - my $ljapp_enable = 1 || $opts->{'ljapp_enable'}; my $s1var = $opts->{'s1var'}; my $extractlinks = 0 || $opts->{'extractlinks'}; my $noautolinks = $extractlinks || $opts->{'noautolinks'}; @@ -612,10 +610,11 @@ } elsif ($tag eq "lj-app") { - next TOKEN unless $ljapp_enable; - - $newdata .= LJ::UserApps->expand_ljapp_tag($attr); - next TOKEN; + next TOKEN if $LJ::DISABLED{'userapps'}; + my $app = LJ::UserApps->get_application( %$attr ); + next TOKEN unless $app && $app->can_show_restricted; + $newdata .= $app->ljapp_display($attr->{extra}); + next TOKEN; } elsif ($tag eq "lj") {