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-07-25 04:43 am

[dw-free] Review approve.bml, remove pending-related code if unused

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

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

Clean up.

Patch by [staff profile] denise.

Files modified:
  • htdocs/approve.bml
  • htdocs/approve.bml.text
--------------------------------------------------------------------------------
diff -r a1c8fff7c370 -r 6865fbf1b5da htdocs/approve.bml
--- a/htdocs/approve.bml	Sat Jul 25 02:42:39 2009 +0000
+++ b/htdocs/approve.bml	Sat Jul 25 04:43:19 2009 +0000
@@ -23,42 +23,6 @@ body<=
     LJ::decode_url_string($aa->{'arg1'}, $arg);
 
     ### perform actions according to the action type
-
-    # invite users to communities
-    if ($aa->{'action'} eq 'comm_invite') {
-
-        my $dbh = LJ::get_db_writer();
-
-        my $targetid = $arg->{'targetid'};
-        return LJ::bad_input($ML{'.error.internerr.invalidaction'}) unless $targetid;
-
-        # add to community
-        if ($arg->{'member'}) {
-            LJ::join_community( $targetid, $aa->{userid}, 0, undef, moderated_add => 1 );
-        }
-
-        # set up rels with this community
-        my @rels = ();
-        push @rels, 'A' if $arg->{'admin'};
-        push @rels, 'P' if $arg->{'post'};
-        push @rels, 'M' if $arg->{'moderate'};
-        push @rels, 'N' if $arg->{'preapprove'};
-
-        if (@rels) {
-            LJ::set_rel_multi( map { [$aa->{userid}, $targetid, $_] } @rels );
-        }
-
-        # mark this authaction as used
-        $dbh->do("UPDATE authactions SET used='Y' WHERE aaid=?", undef, $aa->{'aaid'});
-
-        # return success
-        my $username = LJ::get_username($aa->{'userid'});
-        return "<?h1 $ML{'.comm.success'} h1?>".
-               '<?p '.BML::ml('.comm.text',
-               {'comm'=>LJ::ljuser($username),
-                'aopts'=>'href="'.$LJ::SITEROOT.'/manage/circle/add.bml?user='.$username.'&action=subscribe"'}).
-               ' p?>';
-    }
 
     # approve someone joining a community
     if ($aa->{action} eq 'comm_join_request') {
diff -r a1c8fff7c370 -r 6865fbf1b5da htdocs/approve.bml.text
--- a/htdocs/approve.bml.text	Sat Jul 25 02:42:39 2009 +0000
+++ b/htdocs/approve.bml.text	Sat Jul 25 04:43:19 2009 +0000
@@ -1,10 +1,5 @@
 ;; -*- coding: utf-8 -*-
 .comm.success=Success
-
-.comm.text<<
-You have been added to [[comm]].
-Click <a [[aopts]]>here</a> to add the community to your friends list.
-.
 
 .commjoin.text<<
 You have approved the membership request of [[user]] in [[comm]].
--------------------------------------------------------------------------------

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