Abe Hassan (burr86) wrote in changelog,
Abe Hassan
burr86
changelog

[livejournal] r12390: * Properly display $comment->manage_butt...

Committer: ahassan
* Properly display $comment->manage_buttons (eg, in the Inbox) if the comment poster is anonymous; just pass through "" for the username.

http://rt.livejournal.org/Ticket/Display.html?id=4263

U   trunk/cgi-bin/LJ/Comment.pm
Modified: trunk/cgi-bin/LJ/Comment.pm
===================================================================
--- trunk/cgi-bin/LJ/Comment.pm	2007-08-31 21:45:50 UTC (rev 12389)
+++ trunk/cgi-bin/LJ/Comment.pm	2007-08-31 21:50:30 UTC (rev 12390)
@@ -668,13 +668,14 @@
 
     my $managebtns = '';
 
-    return '' unless $self->poster && $self->entry->poster;
+    return '' unless $self->entry->poster;
 
-    if (LJ::Talk::can_delete($remote, $self->journal, $self->entry->poster, $self->poster->{user})) {
+    my $poster = $self->poster ? $self->poster->user : "";
+    if (LJ::Talk::can_delete($remote, $self->journal, $self->entry->poster, $poster)) {
         $managebtns .= "<a href='$LJ::SITEROOT/delcomment.bml?${jargent}id=$dtalkid'>" . LJ::img("btn_del", "", { 'align' => 'absmiddle', 'hspace' => 2, 'vspace' => }) . "</a>";
     }
 
-    if (LJ::Talk::can_freeze($remote, $self->journal, $self->entry->poster, $self->poster->{user})) {
+    if (LJ::Talk::can_freeze($remote, $self->journal, $self->entry->poster, $poster)) {
         unless ($self->is_frozen) {
             $managebtns .= "<a href='$LJ::SITEROOT/talkscreen.bml?mode=freeze&${jargent}talkid=$dtalkid'>" . LJ::img("btn_freeze", "", { align => 'absmiddle', hspace => 2, vspace => }) . "</a>";
         } else {
@@ -682,7 +683,7 @@
         }
     }
 
-    if (LJ::Talk::can_screen($remote, $self->journal, $self->entry->poster, $self->poster->{user})) {
+    if (LJ::Talk::can_screen($remote, $self->journal, $self->entry->poster, $poster)) {
         unless ($self->is_screened) {
             $managebtns .= "<a href='$LJ::SITEROOT/talkscreen.bml?mode=screen&${jargent}talkid=$dtalkid'>" . LJ::img("btn_scr", "", { 'align' => 'absmiddle', 'hspace' => 2, 'vspace' => }) . "</a>";
         } else {

Subscribe

  • Post a new comment

    Error

    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

    Your IP address will be recorded 

  • 0 comments