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;
--------------------------------------------------------------------------------
cesy: Home is where the <3 is (Dreamwidth) (Dreamwidth)

Re: friendsfriends

[personal profile] cesy 2009-06-10 03:28 pm (UTC)(link)
Yay :)

[personal profile] kareila is awesome, as are you.

I guess there will be a very exciting news post after Mark gets back and code pushes lots of bugfixes and new features.