fu: Close-up of Fu, bringing a scoop of water to her mouth (Default)
fu ([personal profile] fu) wrote in [site community profile] changelog2011-09-12 10:16 am

[dw-free] unused page: htdocs/community/transfer

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

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

Remove unused page and references to said unused page.

Patch by [personal profile] fu.

Files modified:
  • bin/upgrading/en.dat
  • cgi-bin/crumbs.pl
  • htdocs/community/transfer.bml
--------------------------------------------------------------------------------
diff -r ae729438d311 -r 9de09f391398 bin/upgrading/en.dat
--- a/bin/upgrading/en.dat	Mon Sep 12 17:58:12 2011 +0800
+++ b/bin/upgrading/en.dat	Mon Sep 12 18:16:06 2011 +0800
@@ -247,8 +247,6 @@
 
 crumb.textmessage=Send Text Message
 
-crumb.transfercomm=Transfer Community
-
 crumb.translate=Translation Area
 
 crumb.translateteams=Translation Teams
diff -r ae729438d311 -r 9de09f391398 cgi-bin/crumbs.pl
--- a/cgi-bin/crumbs.pl	Mon Sep 12 17:58:12 2011 +0800
+++ b/cgi-bin/crumbs.pl	Mon Sep 12 18:16:06 2011 +0800
@@ -91,7 +91,6 @@
     'supportscores' => ['High Scores', '/support/highscores', 'support'],
     'supportsubmit' => ['Submit Request', '/support/submit', 'support'],
     'textmessage' => ['Send Text Message', '/tools/textmessage', 'home'],
-    'transfercomm' => ['Transfer Community', '/community/transfer', 'managecommunity'],
     'translate' => ['Translation Area', '/translate/', 'home'],
     'translateteams' => ['Translation Teams', '/translate/teams', 'translate'],
     'unsubscribe' => ['Unsubscribe', '/unsubscribe', 'home'],
diff -r ae729438d311 -r 9de09f391398 htdocs/community/transfer.bml
--- a/htdocs/community/transfer.bml	Mon Sep 12 17:58:12 2011 +0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,84 +0,0 @@
-<?_c
-# This code was forked from the LiveJournal project owned and operated
-# by Live Journal, Inc. The code has been modified and expanded by
-# Dreamwidth Studios, LLC. These files were originally licensed under
-# the terms of the license supplied by Live Journal, Inc, which can
-# currently be found at:
-#
-# http://code.livejournal.org/trac/livejournal/browser/trunk/LICENSE-LiveJournal.txt
-#
-# In accordance with the original license, this code and all its
-# modifications are provided under the GNU General Public License.
-# A copy of that license can be found in the LICENSE file included as
-# part of this distribution.
-_c?>
-<?_code
-{
-    LJ::set_active_crumb('transfercomm');
-
-    $title = $ML{'.title'};
-    $body = "";
-
-    # is there a user out there?
-    my $remote = LJ::get_remote();
-    return "<?needlogin?>" unless $remote;
-
-    # bad statusvis?
-    unless ( $remote->is_visible ) {
-        $body = "<?h1 $ML{'.badstatus.title'} h1?><?p $ML{'.badstatus.body'} p?>";
-        return;
-    }
-
-    # see if they posted and perform actions if so
-    if (LJ::did_post()) {
-        $errors{invalidform} = $ML{'error.invalidform'} unless LJ::check_form_auth();
-        # get info about the community
-        my $cu = LJ::load_user($POST{comm});
-        $errors{username} = $ML{'.error.notfound'} unless $cu;
-
-        # the rest of the errors assume a community exists
-        if ($cu) {
-            # status/type errors
-            $errors{username} = $ML{'.error.notcomm'} unless $cu->is_community;
-            $errors{username} = $ML{'.error.badstatus'} unless %errors || $cu->is_visible || $cu->is_deleted;
-
-            # are they already a maintainer?
-            $errors{username} = $ML{'.error.alreadyadmin'} if !%errors && $remote->can_manage_other( $cu );
-
-            # check the password last
-            $errors{password} = $ML{'.error.nopassword'} if !%errors && !$POST{password};
-            $errors{password} = $ML{'.error.mismatch'} if !%errors && !LJ::auth_okay($cu, $POST{password});
-        }
-
-        # everything checks out, transfer it
-        unless (%errors) {
-            $cu->log_event('maintainer_add', { actiontarget => $remote->{userid}, remote => $remote });
-            LJ::set_rel($cu, $remote, 'A');
-            $cu->update_self( { password => '' } );
-            $body = "<?h1 $ML{'.success.title'} h1?><?p ";
-            $body .= BML::ml('.success.body', { comm =>  LJ::ljuser($cu, { type => 'C' }) });
-            $body .= " p?>";
-            return;
-        }
-    }
-
-    # setup the form to transfer the community
-    $body .= "<?p $ML{'.body'} p?>";
-    $body .= "<form method='post' action='/community/transfer'>";
-    $body .= LJ::form_auth();
-    $body .= "<table summary=''><tr><td>$ML{'.account'}</td>";
-    $body .= "<td>" . LJ::html_text({ name => 'comm', id => 'comm', value => $POST{comm} }) . "</td></tr>\n";
-    $body .= "<tr><td></td><td><?inerr $errors{invalidform} inerr?></td></tr>" if $errors{invalidform};
-    $body .= "<tr><td></td><td><?inerr $errors{username} inerr?></td></tr>" if $errors{username};
-    $body .= "<tr><td>$ML{'.password'}</td>";
-    $body .= "<td>" . LJ::html_text({ type => 'password', name => 'password', id => 'password' }) . "</td></tr>\n";
-    $body .= "<tr><td></td><td><?inerr $errors{password} inerr?></td></tr>" if $errors{password};
-    $body .= "<tr><td></td><td>" . LJ::html_submit(undef, $ML{'.button.title'}) . "</td></tr>";
-    $body .= "</table></form>";
-
-    return;
-}
-_code?><?page
-title=><?_code return $title; _code?>
-body=><?_code return $body; _code?>
-page?>
--------------------------------------------------------------------------------
pne: A picture of a plush toy, halfway between a duck and a platypus, with a green body and a yellow bill and feet. (Default)

[personal profile] pne 2011-09-28 12:03 pm (UTC)(link)
Ah, those were the days!

Also, I totally didn't know that community/transfer.bml would nuke the password as part of the transfer. I wonder why it would do that.
denise: Image: Me, facing away from camera, on top of the Castel Sant'Angelo in Rome (Default)

[staff profile] denise 2011-09-28 08:17 pm (UTC)(link)
Likely so that a) there could be no takebacks b) people didn't have to give away the pw, which was probably the same as their personal account anyway (no matter how many times you tell people not to re-use pws, they do)