madeon (madeon) wrote in changelog,
madeon
madeon
changelog

[livejournal] r23227: LJSUP-14142: Delayed enetries poster wor...

Committer: sbelyaev
LJSUP-14142: Delayed enetries poster worker : post problem
U   trunk/cgi-bin/LJ/RelationService.pm
Modified: trunk/cgi-bin/LJ/RelationService.pm
===================================================================
--- trunk/cgi-bin/LJ/RelationService.pm	2012-10-31 11:31:56 UTC (rev 23226)
+++ trunk/cgi-bin/LJ/RelationService.pm	2012-10-31 11:39:12 UTC (rev 23227)
@@ -4,6 +4,7 @@
 use LJ::ExtBlock;
 use LJ::JSON;
 
+use LJ::Request;
 use LJ::RelationService::RSAPI;
 use LJ::RelationService::MysqlAPI;
 
@@ -23,7 +24,7 @@
 
     return 0 unless LJ::is_enabled('send_test_load_to_rs2');
 
-    my $values = $singletons{'__lj11_params_value'};
+    my $values = LJ::Request->is_inited ? $singletons{'__lj11_params_value'} : 0;
     unless ($values) {
         my $ext_block = LJ::ExtBlock->load_by_id('lj11_params');
         $values = $ext_block ? LJ::JSON->from_json($ext_block->blocktext) : {};
@@ -193,7 +194,8 @@
     }
 
     return $singletons{$u->{userid}}->{$friend->{userid}}->{$type}
-        if exists $singletons{$u->{userid}}->{$friend->{userid}}->{$type} && !%opts;
+        if exists $singletons{$u->{userid}}->{$friend->{userid}}->{$type} && 
+                    !%opts && LJ::Request->is_inited;
 
     if ($class->_load_alt_api('read', $type)) {
         my $alt = $class->alt_api($u);
@@ -246,7 +248,8 @@
     return 0 unless $u && $friend && $type;
 
     return $singletons{$u->userid}->{$friend->userid}->{gmask}
-        if exists $singletons{$u->userid}->{$friend->userid}->{gmask} && !%opts;
+        if exists $singletons{$u->userid}->{$friend->userid}->{gmask} && 
+                    !%opts && LJ::Request->is_inited;
 
     if ($class->_load_alt_api('read', $type)) {
         my $alt = $class->alt_api($u);

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