Committer: anazarov
LJSUP-10159: New Comment FormU trunk/bin/upgrading/en.dat U trunk/cgi-bin/Apache/LiveJournal.pm U trunk/cgi-bin/LJ/Talk/Post.pm U trunk/htdocs/talkscreen.bml
Modified: trunk/bin/upgrading/en.dat =================================================================== --- trunk/bin/upgrading/en.dat 2011-10-31 07:24:46 UTC (rev 20449) +++ trunk/bin/upgrading/en.dat 2011-10-31 08:31:31 UTC (rev 20450) @@ -5368,12 +5368,24 @@ taglib.error.toomany=This would make you exceed your maximum of [[max]] tags. Please remove some and try again. +talk.anonuser=Anonymous + talk.anonwrote=Someone wrote, talk.anonwrote_comm=Someone wrote in [[commlink]], +talk.asanonymous=Anonymously + talk.btn.preview=Preview +talk.check=Check + +talk.checkall=Check All + +talk.checkspelling=Spellcheck + +talk.collapseall=Collapse All + talk.collapselink|staleness=1 talk.collapselink=Collapse @@ -5392,6 +5404,8 @@ talk.commentsread.nocomments|staleness=1 talk.commentsread.nocomments=No comments +talk.created=Created: + talk.curname_Groups|staleness=1 talk.curname_Groups=<b>Custom friends groups:</b> @@ -5403,6 +5417,21 @@ talk.curname_Tags=<b>Entry tags:</b> +talk.delandspamall=Delete All and mark as spam + +talk.delete=Delete + +talk.deleteall=Delete All + +talk.deletedpost=Deleted Post + +talk.deleteduser=<i>Deleted user: [[username]]</i> + +talk.edit=Edit +talk.edited=Edited: + +talk.emptypostalert=You need to write something first + talk.error.bogusargs=Bogus arguments talk.error.cantedit|staleness=1 @@ -5478,28 +5507,80 @@ talk.error.suspendedentryreply|staleness=1 talk.error.suspendedentryreply=This entry is suspended. You cannot reply to it. You can visit the journal <a [[aopts]]>here</a>. +talk.expandall=Expand All + talk.expandlink|staleness=1 talk.expandlink=Expand +talk.freeze=Freeze + +talk.fromip=(from [[ip]]) +talk.fromip.extended|staleness=1 +talk.fromip.extended=([[country]], [[city]] / [[ip]]) + talk.frozen=Replies frozen +talk.help=Help + +talk.insertphoto=Insert Photo + +talk.insertvideo=Insert Video + +talk.ipalert=Your IP address will be recorded + +talk.next=Next + +talk.nextshortcut=Ctrl → + talk.parentlink=Parent +talk.prev=Previous + +talk.prevshortcut=← Ctrl + talk.readsimilar=Read similar journal entries: +talk.replycount=[[count]] replies + talk.replytothis=Reply to this +talk.screen=Screen + +talk.screenedpost=Screened post + talk.somebodywrote=[[realname]] ([[userlink]]) wrote, talk.somebodywrote_comm=[[realname]] ([[userlink]]) wrote in [[commlink]], +talk.spam=Spam + +talk.spamcount=[[count]] suspicious comments + +talk.spammedpost=Spammed post + talk.spellcheck=Check spelling during preview +talk.suspendedpost=Suspended post + talk.threadlink=Thread +talk.track=Track + +talk.unfreeze=Unfreeze + +talk.unscreen=Unscreen + talk.unscreentoreply|staleness=1 talk.unscreentoreply=Unscreen to reply +talk.unspam=Unspam + +talk.unspamall=Unspam All + +talk.unspamtoreply=Unspam to reply + +talk.userswitch=switch + time.ago.day=[[num]] [[?num|day|days]] ago time.ago.hour=[[num]] [[?num|hour|hours]] ago Modified: trunk/cgi-bin/Apache/LiveJournal.pm =================================================================== --- trunk/cgi-bin/Apache/LiveJournal.pm 2011-10-31 07:24:46 UTC (rev 20449) +++ trunk/cgi-bin/Apache/LiveJournal.pm 2011-10-31 08:31:31 UTC (rev 20450) @@ -1841,12 +1841,24 @@ } if ($RQ{'mode'} eq "entry" || $RQ{'mode'} eq "reply") { - my $filename = $RQ{'mode'} eq "entry" - ? ( $GET{talkread2} - ? "$LJ::HOME/htdocs/talkread2.bml" - : "$LJ::HOME/htdocs/talkread.bml" - ) - : "$LJ::HOME/htdocs/talkpost.bml"; + my $filename; + if ( $RQ{'mode'} eq 'entry' ) { + if ( $GET{'talkread2'} ) { + $filename = $LJ::HOME. '/htdocs/talkread2.bml'; + } else { + if ( $LJ::DISABLED{'new_comments'} ) { + $filename = $LJ::HOME. '/htdocs/talkread.bml'; + } else { + $filename = $LJ::HOME. '/htdocs/talkread_new.bml'; + } + } + } else { + if ( $LJ::DISABLED{'new_comments'} ) { + $filename = $LJ::HOME. '/htdocs/talkpost.bml'; + } else { + $filename = $LJ::HOME. '/htdocs/talkpost_new.bml'; + } + } LJ::Request->notes("_journal" => $RQ{'user'}); LJ::Request->notes("bml_filename" => $filename); return Apache::BML::handler(); Modified: trunk/cgi-bin/LJ/Talk/Post.pm =================================================================== --- trunk/cgi-bin/LJ/Talk/Post.pm 2011-10-31 07:24:46 UTC (rev 20449) +++ trunk/cgi-bin/LJ/Talk/Post.pm 2011-10-31 08:31:31 UTC (rev 20450) @@ -670,7 +670,8 @@ } # unban the parent comment if needed - if ($parent->{state} eq 'B' && $comment->{u} && LJ::Talk::can_unmark_spam($comment->{u}, $journalu, $entryu)) { + my $commenter = $comment->{'u'} || LJ::get_remote(); + if ($parent->{state} eq 'B' && $commenter && LJ::Talk::can_unmark_spam($commenter, $journalu, $entryu)) { LJ::Talk::unspam_comment($journalu, $item->{itemid}, $parent->{talkid}); $parent->{state} = 'A'; } Modified: trunk/htdocs/talkscreen.bml =================================================================== --- trunk/htdocs/talkscreen.bml 2011-10-31 07:24:46 UTC (rev 20449) +++ trunk/htdocs/talkscreen.bml 2011-10-31 08:31:31 UTC (rev 20450) @@ -183,7 +183,7 @@ LJ::Talk::freeze_thread($u, $qitemid, $qtalkid); } return $jsres->($mode) if $jsmode; - my $linktext = BML::ml('.link', { aopts => "href='$itemlink'" }); + my $linktext = BML::ml('.link', { aopts => "href='$commentlink'" }); $body = "<?h1 $ML{'.frozen.title'} h1?><?p $ML{'.frozen.body'} $linktext p?>"; return; } @@ -211,7 +211,7 @@ LJ::Talk::unfreeze_thread($u, $qitemid, $qtalkid); } return $jsres->($mode) if $jsmode; - my $linktext = BML::ml('.link', { aopts => "href='$itemlink'" }); + my $linktext = BML::ml('.link', { aopts => "href='$commentlink'" }); $body = "<?h1 $ML{'.unfrozen.title'} h1?><?p $ML{'.unfrozen.body'} $linktext p?>"; return; }