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] changelog2010-03-04 02:50 pm

[dw-free] Regular interface for leaving deleted communities/journals

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

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

Add link to leave a deleted community from its journal page or its profile
page, if you are a member of this community.

Patch by [staff profile] denise.

Files modified:
  • bin/upgrading/en.dat
  • cgi-bin/LJ/User.pm
  • htdocs/userinfo.bml
--------------------------------------------------------------------------------
diff -r 4478dc798e28 -r 1c34a0d0020e bin/upgrading/en.dat
--- a/bin/upgrading/en.dat	Thu Mar 04 06:07:47 2010 -0800
+++ b/bin/upgrading/en.dat	Thu Mar 04 06:54:36 2010 -0800
@@ -1150,6 +1150,8 @@ error.console.notpermitted=You are not p
 error.console.notpermitted=You are not permitted to run this command.
 
 error.dberror=A database error occurred:
+
+error.deleted.leavecomm=If you want, you can <a [[aopts]]>leave the community</a>.
 
 error.deleted.name=Deleted
 
diff -r 4478dc798e28 -r 1c34a0d0020e cgi-bin/LJ/User.pm
--- a/cgi-bin/LJ/User.pm	Thu Mar 04 06:07:47 2010 -0800
+++ b/cgi-bin/LJ/User.pm	Thu Mar 04 06:54:36 2010 -0800
@@ -8618,6 +8618,8 @@ sub make_journal
                 $warning = BML::ml( 'error.deleted.text', { user => $u->display_name } );
             }
 
+            $warning .= "&nbsp;" . BML::ml( 'error.deleted.leavecomm', { aopts => "href='$LJ::SITEROOT/community/leave?comm=" . $u->user . "'" } ) if $u->is_community && $u->trusts_or_has_member( $remote );
+
             return $error->( $warning, "404 Not Found", BML::ml( 'error.deleted.name' ) );
         }
         if ( $u->is_suspended ) {
diff -r 4478dc798e28 -r 1c34a0d0020e htdocs/userinfo.bml
--- a/htdocs/userinfo.bml	Thu Mar 04 06:07:47 2010 -0800
+++ b/htdocs/userinfo.bml	Thu Mar 04 06:54:36 2010 -0800
@@ -144,7 +144,9 @@ body<=
                 $del_body .= BML::ml( 'error.deleted.text.withreason', { user => $u->display_name, reason => $u->prop( 'delete_reason' ) } );
             } else {
                 $del_body .= BML::ml( 'error.deleted.text', { user => $u->display_name } );
-            }            
+            }
+
+            $del_body .= "&nbsp;" . BML::ml( 'error.deleted.leavecomm', { aopts => "href='$LJ::SITEROOT/community/leave?comm=" . $u->user . "'" } ) if $u->is_community && $u->trusts_or_has_member( $remote );
 
             $del_body .= " p?>";
             $del_body .= BML::ml( '.error.deleted.purgenotification', { aopts => "href='$LJ::SITEROOT/manage/subscriptions/user?journal=" . $u->user . "'" } )
--------------------------------------------------------------------------------

Post a comment in response:

This account has disabled anonymous posting.
If you don't have an account you can create one now.
No Subject Icon Selected
More info about formatting

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