[dw-free] stray link to unscreen on screened comments
[commit: http://hg.dwscoalition.org/dw-free/rev/a041e9c1d2fd]
http://bugs.dwscoalition.org/show_bug.cgi?id=803
Only show the link to unscreen if you actually have the privs to.
Patch by
denise.
Files modified:
http://bugs.dwscoalition.org/show_bug.cgi?id=803
Only show the link to unscreen if you actually have the privs to.
Patch by
![[staff profile]](https://www.dreamwidth.org/img/silk/identity/user_staff.png)
Files modified:
- bin/upgrading/en.dat
- htdocs/talkread.bml
-------------------------------------------------------------------------------- diff -r 97789fb8ad41 -r a041e9c1d2fd bin/upgrading/en.dat --- a/bin/upgrading/en.dat Sat Jul 11 04:02:07 2009 +0000 +++ b/bin/upgrading/en.dat Sat Jul 11 05:16:12 2009 +0000 @@ -3515,6 +3515,8 @@ talk.readsimilar=Read similar journal en talk.replytothis=Reply to this +talk.screened=Comment screened + talk.somebodywrote=[[realname]] ([[userlink]]) wrote, talk.somebodywrote_comm=[[realname]] ([[userlink]]) wrote in [[commlink]], diff -r 97789fb8ad41 -r a041e9c1d2fd htdocs/talkread.bml --- a/htdocs/talkread.bml Sat Jul 11 04:02:07 2009 +0000 +++ b/htdocs/talkread.bml Sat Jul 11 05:16:12 2009 +0000 @@ -51,6 +51,7 @@ body<= expand talk.expandlink replythis talk.replytothis unscreentoreply talk.unscreentoreply + screened talk.screened frozen talk.frozen link talk.commentpermlink deleted .subjectdeleted @@ -685,8 +686,12 @@ body<= $ret .= "(<a href='$bp'>$T{'replythis'}</a>) "; } else { if ($post->{state} eq 'S') { - # show unscreen to reply link id comment screened - $ret .= "(<a href='$LJ::SITEROOT/talkscreen.bml?mode=unscreen&${jargent}talkid=$dtid'>$T{'unscreentoreply'}</a>) "; + if ( LJ::Talk::can_unscreen( $remote, LJ::load_userid( $item->{ownerid} ), $item, $u ) ) { + # show unscreen to reply link id comment screened + $ret .= "(<a href='$LJ::SITEROOT/talkscreen.bml?mode=unscreen&${jargent}talkid=$dtid'>$T{'unscreentoreply'}</a>) "; + } else { + $ret .= "($T{ 'screened' })"; + } } else { $ret .= "(" . LJ::make_qr_link($dtid, $post->{'subject'}, $T{'replythis'}, $replyurl) . ") "; } --------------------------------------------------------------------------------