madeon (madeon) wrote in changelog,
madeon
madeon
changelog

[livejournal] r19495: LJSV-1687: Now link contain 'selected' v...

Committer: sbelyaev
LJSV-1687: Now link contain 'selected' value.
U   trunk/cgi-bin/LJ/Event/UserMessageRecvd.pm
Modified: trunk/cgi-bin/LJ/Event/UserMessageRecvd.pm
===================================================================
--- trunk/cgi-bin/LJ/Event/UserMessageRecvd.pm	2011-07-19 07:16:28 UTC (rev 19494)
+++ trunk/cgi-bin/LJ/Event/UserMessageRecvd.pm	2011-07-19 08:14:48 UTC (rev 19495)
@@ -35,7 +35,8 @@
     my $msg         = $self->load_message;
     my $other_u     = $msg->other_u;
     my $sender      = $other_u->user;
-    my $inbox       = "$LJ::SITEROOT/inbox/?view=usermsg_recvd";
+    my $msgid       = $msg->msgid;
+    my $inbox       = "$LJ::SITEROOT/inbox/?view=usermsg_recvd&selected=" . $msgid;
     $inbox = "<a href=\"$inbox\">" . LJ::Lang::get_text($lang, 'esn.your_inbox') . "</a>" if $is_html;
 
     my $vars = {
@@ -78,7 +79,9 @@
 sub load_message {
     my ($self) = @_;
 
-    my $msg = LJ::Message->load({msgid => $self->arg1, journalid => $self->u->{userid}, otherid => $self->arg2});
+    my $msg = LJ::Message->load({msgid => $self->arg1,
+                                 journalid => $self->u->{userid},
+                                 otherid => $self->arg2});
     return $msg;
 }
 
@@ -111,7 +114,7 @@
     $ret .= " <a href='$LJ::SITEROOT/inbox/compose.bml?mode=reply&msgid=$msgid'>Reply</a>";
     $ret .= " | <a href='$LJ::SITEROOT/friends/add.bml?user=". $msg->other_u->user ."'>Add as friend</a>"
         unless $u->is_friend($msg->other_u);
-    $ret .= " | <a href='$LJ::SITEROOT/inbox/markspam.bml?msgid=". $msg->msgid ."'>Mark as Spam</a>";
+    $ret .= " | <a href='$LJ::SITEROOT/inbox/markspam.bml?msgid=". $msgid ."'>Mark as Spam</a>";
     $ret .= "</div>";
 
     return $ret;
@@ -122,8 +125,11 @@
 
     my $subject = $self->load_message->subject;
     my $other_u = $self->load_message->other_u;
+    my $msgid = $self->load_message->msgid;
+    my $inbox = "$LJ::SITEROOT/inbox/?view=usermsg_recvd&selected=" . $msgid;
     my $ret = sprintf("You've received a new message \"%s\" from %s. %s",
-                   $subject, $other_u->{user}, "$LJ::SITEROOT/inbox/?view=usermsg_recvd");
+                   $subject, $other_u->{user},
+                   $inbox);
     return $ret;
 }
 
@@ -149,9 +155,11 @@
     my $message = $self->load_message;
     my $subject = $message->subject;
     my $other_u = $message->other_u;
+    my $msgid   = $message->msgid;
 
     return LJ::Lang::get_text($lang, 'event.user_message_recvd.alert', undef, {
             subject => $subject,
+            selected => $msgid,
             user    => $other_u->ljuser_display(),
         });
 }

Tags: livejournal, madeon, pm
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