afuna: Cat under a blanket. Text: "Cats are just little people with Fur and Fangs" (Default)
afuna ([personal profile] afuna) wrote in [site community profile] changelog2009-06-10 02:42 pm

[dw-free] nuke all references to LJ friend functions

[commit: http://hg.dwscoalition.org/dw-free/rev/bbd6f2efb159]

http://bugs.dwscoalition.org/show_bug.cgi?id=1269

Fix network view (the view formerly known as friendsfriends)

Patch by [personal profile] kareila.

Files modified:
  • cgi-bin/DW/Logic/LogItems.pm
--------------------------------------------------------------------------------
diff -r 0cc6a2936852 -r bbd6f2efb159 cgi-bin/DW/Logic/LogItems.pm
--- a/cgi-bin/DW/Logic/LogItems.pm	Wed Jun 10 13:22:03 2009 +0000
+++ b/cgi-bin/DW/Logic/LogItems.pm	Wed Jun 10 14:40:29 2009 +0000
@@ -173,9 +173,7 @@ sub watch_items
         return undef if $fr_loaded;
 
         # get journal's friends
-        my $friends = LJ::get_friends($userid) || {};
-        return undef unless %$friends;
-
+        my $friends = $u->watch_list;
         my %friends_u;
 
         # fill %allfriends with all friendids and cut $friends
@@ -200,7 +198,8 @@ sub watch_items
         my %ffriends = ();
         foreach my $fid (sort { $f_tu->{$b} <=> $f_tu->{$a} } keys %$friends) {
             last if $ffct > 50;
-            my $ff = LJ::get_friends($fid, undef, "memcache_only") || {};
+            my $fu = $friends_u{$fid};
+            my $ff = $fu->watch_list( community_okay => 1, memcache_only => 1 );
             my $ct = 0;
             while (my $ffid = each %$ff) {
                 last if $ct > 100;
--------------------------------------------------------------------------------

Post a comment in response:

This account has disabled anonymous posting.
If you don't have an account you can create one now.
HTML doesn't work in the subject.
More info about formatting

If you are unable to use this captcha for any reason, please contact us by email at support@dreamwidth.org