[dw-free] remove Beta Helper page
[commit: http://hg.dwscoalition.org/dw-free/rev/98cbf5191113]
http://bugs.dwscoalition.org/show_bug.cgi?id=3307
This does an incomplete job, so it's misleading and can lead to people
thinking they have bugs in their code. Use /admin/pay instead.
Patch by
kareila.
Files modified:
http://bugs.dwscoalition.org/show_bug.cgi?id=3307
This does an incomplete job, so it's misleading and can lead to people
thinking they have bugs in their code. Use /admin/pay instead.
Patch by
Files modified:
- htdocs/misc/beta.bml
--------------------------------------------------------------------------------
diff -r 45e3dcb608cd -r 98cbf5191113 htdocs/misc/beta.bml
--- a/htdocs/misc/beta.bml Tue Nov 30 22:39:27 2010 +0800
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,97 +0,0 @@
-<?page
-
-#
-# beta.bml
-#
-# Little beta helper tool.
-#
-# Authors:
-# Mark Smith <mark@dreamwidth.org>
-#
-# Copyright (c) 2009 by Dreamwidth Studios, LLC.
-#
-# This program is free software; you may redistribute it and/or modify it under
-# the same terms as Perl itself. For a copy of the license, please reference
-# 'perldoc perlartistic' or 'perldoc perlgpl'.
-#
-
-body<=
-<?_code
-{
- use strict;
- use vars qw/ %GET %POST $title $windowtitle $headextra @errors @warnings /;
-
- # translated/custom page title can go here
- $title = "Beta Helper";
-
- # for pages that require authentication
- my $remote = LJ::get_remote()
- or return "<?needlogin?>";
-
- # allow the remote user to authenticate as another account (community, etc)
- my $authas = $GET{authas} || $remote->user;
- my $u = LJ::get_authas_user( $authas );
- return LJ::bad_input( $ML{'error.invalidauth'} )
- unless $u;
-
- # verify that the beta is still happening
- return "Beta has ended, sorry!"
- unless $LJ::ENABLE_BETA_TOOLS;
-
- # if post, do something
- if ( LJ::did_post() ) {
- return "Invalid form."
- unless LJ::check_form_auth();
-
- if ( my $t = $POST{accttype} ) {
- my $caps = {
- free => [ [ 1 ], [ 3, 4, 6 ] ],
- paid => [ [ 3 ], [ 1, 4, 6 ] ],
- premium => [ [ 4 ], [ 1, 3, 6 ] ],
- seed => [ [ 6 ], [ 1, 3, 4 ] ],
- }->{$t}
- or return "Invalid caps.";
-
- $u->modify_caps( @$caps );
-
- return BML::redirect( "$LJ::SITEROOT/misc/beta?authas=" . $u->user );
- }
-
- return "Not sure what you want me to do!";
- }
-
- # get current account type
- my $type = 'Unknown :(';
- $type = 'Free Account' if $u->caps & 2;
- $type = 'Paid Account' if $u->caps & 8;
- $type = 'Premium Paid Account' if $u->caps & 16;
- $type = 'Seed Account' if $u->caps & 64;
-
- # build the form
- my $authas = LJ::make_authas_select( $remote, { authas => $u->user } );
- my $ret = "<?p <form method='get'>$authas</form> p?><br />";
- $ret .= "<?p " . $u->ljuser_display . " is a <strong>$type</strong>. p?>";
- $ret .= <<FORM;
-
-<form method="post">
-<?p Change account type:<br />
-<select name="accttype">
- <option value="free">Free Account</option>
- <option value="paid">Paid Account</option>
- <option value="premium">Premium Paid Account</option>
- <option value="seed">Seed Account</option>
-</select><input type="submit" value="Do it!">
-
-FORM
-
- $ret .= LJ::form_auth() . " p?></form>";
- return $ret;
-}
-_code?>
-<=body
-title=><?_code return $title; _code?>
-windowtitle=><?_code return $windowtitle; _code?>
-head<=
-<?_code return $headextra; _code?>
-<=head
-page?>
--------------------------------------------------------------------------------
