[dw-free] profile linking module needs to lose the lj:user
[commit: http://hg.dwscoalition.org/dw-free/rev/b0e6da563cc6]
http://bugs.dwscoalition.org/show_bug.cgi?id=4132
Lose the lj:user when we're not displaying class="ljuser".
Patch by
fu.
Files modified:
http://bugs.dwscoalition.org/show_bug.cgi?id=4132
Lose the lj:user when we're not displaying class="ljuser".
Patch by
Files modified:
- cgi-bin/LJ/User.pm
--------------------------------------------------------------------------------
diff -r a4900f60b399 -r b0e6da563cc6 cgi-bin/LJ/User.pm
--- a/cgi-bin/LJ/User.pm Sat Dec 24 13:43:00 2011 +0800
+++ b/cgi-bin/LJ/User.pm Sat Dec 24 14:07:17 2011 +0800
@@ -3275,7 +3275,8 @@
my $profile = $profile_url ne '' ? $profile_url :
"$LJ::SITEROOT/profile?userid=" . $u->userid . "&t=I$andfull";
- return "<span lj:user='$name' style='white-space: nowrap;$strike'$display_class><a href='$profile'>" .
+ my $lj_user = $opts->{no_ljuser_class} ? "" : " lj:user='$name'";
+ return "<span$lj_user style='white-space: nowrap;$strike'$display_class><a href='$profile'>" .
"<img src='$imgurl' alt='[$type profile] ' width='$width' height='$height'" .
" style='vertical-align: text-bottom; border: 0; padding-right: 1px;' /></a>" .
"<a href='$url' rel='nofollow'><b>$name</b></a></span>";
@@ -8335,6 +8336,7 @@
# Backwards check, because we want it to default to on
my $bold = (exists $opts->{'bold'} and $opts->{'bold'} == 0) ? 0 : 1;
my $ljusername = $bold ? "<b>$user</b>" : "$user";
+ my $lj_user = $opts->{no_ljuser_class} ? "" : " lj:user='$user'";
my $alttext = $type ? "$type profile" : "profile";
@@ -8347,7 +8349,7 @@
$profile = $profile_url ne '' ? $profile_url : $profile . $andfull;
$url = $journal_url ne '' ? $journal_url : $url;
- return "<span lj:user='$user' style='white-space: nowrap;$strike'$display_class>" .
+ return "<span$lj_user style='white-space: nowrap;$strike'$display_class>" .
"<a href='$profile'><img src='$img/$fil' alt='[$alttext] ' width='$x' height='$y'" .
" style='vertical-align: text-bottom; border: 0; padding-right: 1px;' /></a>" .
"<a href='$url'$link_color>$ljusername</a></span>";
--------------------------------------------------------------------------------
