holyandrew (holyandrew) wrote in changelog,
holyandrew
holyandrew
changelog

[livejournal] r22634: LJSUP-12608: Profile Redesign (DISABLED ...

Committer: akanashin
LJSUP-12608: Profile Redesign (DISABLED IN #95)
U   trunk/cgi-bin/LJ/User.pm
U   trunk/cgi-bin/ljprotocol.pl
Modified: trunk/cgi-bin/LJ/User.pm
===================================================================
--- trunk/cgi-bin/LJ/User.pm	2012-08-14 06:46:31 UTC (rev 22633)
+++ trunk/cgi-bin/LJ/User.pm	2012-08-14 07:43:29 UTC (rev 22634)
@@ -9115,8 +9115,14 @@
             LJ::MemCache::incr($friender->user.'_count_yfriends') if $friendee->is_syndicated;
 
             LJ::MemCache::incr($friendee->user.'_count_friendof') if $friendee->{journaltype} eq 'P' || $friendee->{journaltype} eq 'I';
+            
             LJ::MemCache::incr($friendee->user.'_count_member')   if $friendee->{journaltype} eq 'C' || $friendee->{journaltype} eq 'S';
-        }
+ 
+            if (($friendee->{journaltype} eq 'P' || $friendee->{journaltype} eq 'I') && LJ::get_groupmask($friendee->userid, $friender->userid)) {
+                LJ::MemCache::incr($friender->user.'_count_mutual');
+                LJ::MemCache::incr($friendee->user.'_count_mutual');
+            }
+       }
     }
 
     # WARNING: always returns "true". Check result of executing "REPLACE INTO friends ..." statement above.
@@ -9178,7 +9184,13 @@
             LJ::MemCache::decr($u->user.'_count_yfriends') if $friendee->is_syndicated;
     
             LJ::MemCache::decr($friendee->user.'_count_friendof') if $friendee->{journaltype} eq 'P' || $friendee->{journaltype} eq 'I';
+
             LJ::MemCache::decr($friendee->user.'_count_member')   if $friendee->{journaltype} eq 'C' || $friendee->{journaltype} eq 'S';
+
+            if (($friendee->{journaltype} eq 'P' || $friendee->{journaltype} eq 'I') && LJ::get_groupmask($friendee->userid, $u->userid)) {
+                LJ::MemCache::decr($friendee->user.'_count_mutual');
+                LJ::MemCache::decr($u->user.'_count_mutual');
+            }
         }
     }
 

Modified: trunk/cgi-bin/ljprotocol.pl
===================================================================
--- trunk/cgi-bin/ljprotocol.pl	2012-08-14 06:46:31 UTC (rev 22633)
+++ trunk/cgi-bin/ljprotocol.pl	2012-08-14 07:43:29 UTC (rev 22634)
@@ -4532,8 +4532,12 @@
 
                 LJ::MemCache::incr($friendee->user.'_count_friendof') if $friendee->{journaltype} eq 'P' || $friendee->{journaltype} eq 'I';
                 LJ::MemCache::incr($friendee->user.'_count_member')   if $friendee->{journaltype} eq 'C' || $friendee->{journaltype} eq 'S';
- 
 
+                if (($friendee->{journaltype} eq 'P' || $friendee->{journaltype} eq 'I') && LJ::get_groupmask($friendee->userid, $friender->userid)) {
+                    LJ::MemCache::incr($friender->user.'_count_mutual');
+                    LJ::MemCache::incr($friendee->user.'_count_mutual');
+                }
+
                 ## delay event to accumulate users activity
                 require LJ::Event::BefriendedDelayed;
                 LJ::Event::BefriendedDelayed->send(

Tags: akanashin, holyandrew, livejournal, pl, 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