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

[livejournal] r18875: LJSUP-8574 (Create a script for sending ...

Committer: ailyin
LJSUP-8574 (Create a script for sending a inbox message for community members)
U   trunk/cgi-bin/LJ/Message.pm
U   trunk/cgi-bin/LJ/User.pm
Modified: trunk/cgi-bin/LJ/Message.pm
===================================================================
--- trunk/cgi-bin/LJ/Message.pm	2011-04-14 06:17:25 UTC (rev 18874)
+++ trunk/cgi-bin/LJ/Message.pm	2011-04-14 07:18:43 UTC (rev 18875)
@@ -382,12 +382,12 @@
 
     # Can't send to yourself
     if ($ou->equals($ru)) {
-        push @$errors, BML::ml('error.message.yourself');
+        push @$errors, LJ::Lang::ml('error.message.yourself');
     }
 
     # Can only send to other individual users
     unless ($ru->is_person || $ru->is_identity) {
-        push @$errors, BML::ml('error.message.individual', { 'ljuser' => $ru->ljuser_display });
+        push @$errors, LJ::Lang::ml('error.message.individual', { 'ljuser' => $ru->ljuser_display });
         return 0;
     }
 
@@ -395,14 +395,14 @@
     if ($ru->is_deleted || $ru->is_expunged) {
         push @$errors,
              $ru->is_deleted
-                ? BML::ml('error.message.deleted', { 'ljuser' => $ru->ljuser_display })
-                : BML::ml('error.message.expunged', { 'ljuser' => $ru->ljuser_display });
+                ? LJ::Lang::ml('error.message.deleted', { 'ljuser' => $ru->ljuser_display })
+                : LJ::Lang::ml('error.message.expunged', { 'ljuser' => $ru->ljuser_display });
         return 0;
     }
 
     # Will target user accept messages from sender
     unless ($ru->can_receive_message($ou)) {
-        push @$errors, BML::ml('error.message.canreceive', { 'ljuser' => $ru->ljuser_display });
+        push @$errors, LJ::Lang::ml('error.message.canreceive', { 'ljuser' => $ru->ljuser_display });
         return 0;
     }
 

Modified: trunk/cgi-bin/LJ/User.pm
===================================================================
--- trunk/cgi-bin/LJ/User.pm	2011-04-14 06:17:25 UTC (rev 18874)
+++ trunk/cgi-bin/LJ/User.pm	2011-04-14 07:18:43 UTC (rev 18875)
@@ -8045,6 +8045,8 @@
 sub rate_check {
     my ($u, $ratename, $count, $opts) = @_;
 
+    return 1 if grep { $_ eq $u->username } @LJ::NO_RATE_CHECK_USERS;
+
     my $rateperiod = LJ::get_cap($u, "rateperiod-$ratename");
     return 1 unless $rateperiod;
 

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