Jason (squeaky19) wrote in lj_dev,
Jason
squeaky19
lj_dev

Bug in console when adding freinds

There is a big in the admin console when adding a friend. This exists on the current LJ installation as well as any site using the code. When you add a friend via the console who is already a friend of yours, their groupmask gets wiped out.

The bug is in cgi-bin/LJ/Console/Commands/Friend.pm here is a diff that I created that seems to fix it.

--- Friend.pm.bak	2009-05-19 15:29:42.000000000 -0400
+++ Friend.pm	2009-05-19 15:47:19.000000000 -0400
@@ -92,7 +92,9 @@
             } else {
                 $self->error("You don't have a group called '$group'.");
             }
-        }
+        } else {
+            $gmask = LJ::get_groupmask($remote, $fu);
+        }
 
         my $opts = {};
         $opts->{'groupmask'} = $gmask if $gmask;
Tags: bugs, bugs: console, bugs: console: friend, server, server: console friending, server: patch
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 

  • 2 comments