Андрей (andy) wrote in changelog,
Андрей
andy
changelog

[ljcom] r11170: LJSV-1907 (Users with paid and perm acco...

Committer: ailyin
LJSV-1907 (Users with paid and perm accounts don't recieve full text of private messages from inbox via email)
U   trunk/bin/upgrading/en_LJ.dat
U   trunk/cgi-bin/LJ/Hooks/SUP.pm
U   trunk/ssldocs/img/userinfo.gif
Modified: trunk/bin/upgrading/en_LJ.dat
===================================================================
--- trunk/bin/upgrading/en_LJ.dat	2011-11-10 07:21:15 UTC (rev 11169)
+++ trunk/bin/upgrading/en_LJ.dat	2011-11-10 07:33:55 UTC (rev 11170)
@@ -2142,19 +2142,6 @@
 
 esn.email.html.footer.unsibscribe=<br/><br/><div style="font-size: 9px;">If you’d like to unsubscribe from this notification, please click <a href="[[siteroot]]/manage/subscriptions/unsubscribe.bml?timest=[[timestamp]]&user=[[username]]&subs_id=[[subs_id]]&hash=[[hash]]">here</a>.</div><br/>
 
-esn.email.pm|staleness=1
-esn.email.pm<<
-Hi [[user]],
-
-[[sender]] sent you a message on [[sitenameshort]]: [[subject]].
-The message was:
-[[body]]
-
-Go to [[inbox]] to view your new messages.
-
-Or you can:
-.
-
 esn.error.quota=You have exceeded your quota of [[quota]] active subscriptions. Please <a[[aopts]]>delete or de-activate some of your existing subscriptions</a> in order to add new ones.
 
 esn.error.quota.upgrade|staleness=1
@@ -2224,9 +2211,6 @@
 
 esn.officialpost.subject=[[sitenameshort]] Major Notes: [[subject]]
 
-esn.reply_message|staleness=1
-esn.reply_message=[[openlink]]Reply to message[[closelink]]
-
 esn.security_attribute_changed.account_activated.alert=Your account has been activated.
 
 esn.security_attribute_changed.account_deleted.alert=Your account has been deleted.

Modified: trunk/cgi-bin/LJ/Hooks/SUP.pm
===================================================================
--- trunk/cgi-bin/LJ/Hooks/SUP.pm	2011-11-10 07:21:15 UTC (rev 11169)
+++ trunk/cgi-bin/LJ/Hooks/SUP.pm	2011-11-10 07:33:55 UTC (rev 11170)
@@ -692,74 +692,6 @@
     return ($page =~ /^(?:recent|friends|entry|reply|tag|day)$/) ? 1 : 0;
 });
 
-### Private Message ###
-sub _email_pm {
-    my ($ev, $u, $is_html) = @_;
-
-    my ($classname) = (ref $ev) =~ /Event::(.+?)$/;
-    return '' unless $classname =~ 'UserMessageRecvd';
-
-    return '' unless $u->get_cap('full_pm_esn');    # Not a payed users
-
-    my $lang        = $u->prop('browselang');
-    my $msg         = $ev->load_message;
-    my $other_u     = $msg->other_u;
-    my $sender      = $other_u->user;
-    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 = {
-        user            => $is_html ? ($u->ljuser_display) : ($u->user),
-        subject         => $msg->subject,
-        body            => $msg->body,
-        sender          => $is_html ? ($other_u->ljuser_display) : ($other_u->user),
-        postername      => $other_u->user,
-        sitenameshort   => $LJ::SITENAMESHORT,
-        inbox           => $inbox,
-        siteroot        => $LJ::SITEROOT,
-    };
-
-    my $reply_lnk = "$LJ::SITEROOT/inbox/compose.bml?mode=reply&msgid=$msgid";
-    my $body = LJ::Lang::get_text($lang, 'esn.email.pm', undef, $vars) .
-        $ev->format_options($is_html, $lang, $vars,
-        {
-            'esn.reply_message'   => [ 1, $reply_lnk ],
-            'esn.view_profile'    => [ 2, $other_u->profile_url ],
-            'esn.read_journal'    => [ 3, $other_u->journal_base ],
-            'esn.add_friend'      => [ $u->is_friend($other_u) ? 0 : 4,
-                                            "$LJ::SITEROOT/friends/add.bml?user=$sender" ],
-        }
-    );
-
-    my $footer = LJ::Lang::get_text($lang, 'esn.footer.text', undef, $vars);
-    if ($is_html) {
-        $body =~ s/\n/\n<br\/>/g unless $body =~ m!<br!i;
-        my $html_footer = LJ::run_hook('esn_email_html_footer', event => $ev, rcpt_u => $u );
-        unless ($html_footer) {
-            $html_footer = LJ::auto_linkify($footer);
-            $html_footer =~ s/\n/\n<br\/>/g;
-        }
-        $body .= $html_footer;
-        # run transform hook on html body
-        LJ::run_hook("esn_email_html_transform", event => $ev, rcpt_u => $u, bodyref => \$body);
-    } else {
-        $body .= $footer;
-    }
-
-    return $body;
-}
-
-LJ::register_hook('esn_email_html', sub {
-    my ($ev, $u) = @_;
-    return _email_pm($ev, $u, 1);
-});
-
-LJ::register_hook('esn_email_plaintext', sub {
-    my ($ev, $u) = @_;
-    return _email_pm($ev, $u, 0);
-});
-
 LJ::register_hook("support_request_extra_cat", sub {
     ##
     ## For Cyrillic users (by IP or Cyr flag) add support category "Russian Support".

Modified: trunk/ssldocs/img/userinfo.gif
===================================================================
(Binary files differ)

Tags: ailyin, andy, dat, gif, ljcom, 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