mark: A photo of Mark kneeling on top of the Taal Volcano in the Philippines. It was a long hike. (Default)
Mark Smith ([staff profile] mark) wrote in [site community profile] changelog2009-12-24 07:26 am

[dw-free] Misc BML cleanup

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

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

Remove postreg, we don't use these -- don't even work.

Patch by [staff profile] mark.

Files modified:
  • cgi-bin/LJ/User.pm
  • cgi-bin/LJ/Widget/CreateAccount.pm
  • htdocs/postreg/_config.bml
  • htdocs/postreg/find.bml
  • htdocs/postreg/find.bml.text
  • htdocs/postreg/index.bml
  • htdocs/postreg/index.bml.text
--------------------------------------------------------------------------------
diff -r 824729656153 -r af9c31b2e8dd cgi-bin/LJ/User.pm
--- a/cgi-bin/LJ/User.pm	Thu Dec 24 07:21:01 2009 +0000
+++ b/cgi-bin/LJ/User.pm	Thu Dec 24 07:26:51 2009 +0000
@@ -370,15 +370,6 @@ sub is_protected_username {
 }
 
 
-sub postreg_completed {
-    my $u = shift;
-
-    return 0 unless $u->bio;
-    return 0 unless $u->interest_count;
-    return 1;
-}
-
-
 sub who_invited {
     my $u = shift;
     my $inviterid = LJ::load_rel_user($u, 'I');
diff -r 824729656153 -r af9c31b2e8dd cgi-bin/LJ/Widget/CreateAccount.pm
--- a/cgi-bin/LJ/Widget/CreateAccount.pm	Thu Dec 24 07:21:01 2009 +0000
+++ b/cgi-bin/LJ/Widget/CreateAccount.pm	Thu Dec 24 07:26:51 2009 +0000
@@ -546,7 +546,6 @@ sub handle_post {
             customizeurl => "$LJ::SITEROOT/customize/",
             postentryurl => "$LJ::SITEROOT/update",
             setsecreturl => "$LJ::SITEROOT/set_secret",
-            LJ::Hooks::run_hook('extra_fields_in_postreg_esn'),
         });
 
         LJ::send_mail({
diff -r 824729656153 -r af9c31b2e8dd htdocs/postreg/_config.bml
--- a/htdocs/postreg/_config.bml	Thu Dec 24 07:21:01 2009 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,1 +0,0 @@
-ForceScheme horizon_lite
diff -r 824729656153 -r af9c31b2e8dd htdocs/postreg/find.bml
--- a/htdocs/postreg/find.bml	Thu Dec 24 07:21:01 2009 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,39 +0,0 @@
-<?page
-body<=
-<?_code
-{
-    use strict;
-
-    my $ret;
-    my $remote = LJ::get_remote()
-        or return "<?needlogin?>";
-
-    $ret .= "<h2><a href='$LJ::SITEROOT/postreg/'>$ML{'.nav.editprofile'}</a> &gt; <strong>$ML{'.nav.findfriends'}</strong></h2>";
-    $ret .= "<p>" . BML::ml('.intro', {sitename => $LJ::SITENAMESHORT}) . "</p>";
-
-    $ret .= "<div id='browse'>";
-    $ret .= "<h2>" . BML::ml('.browse', {'sitename' => $LJ::SITENAMESHORT}) . "</h2>";
-    $ret .= "<p><a href='$LJ::SITEROOT/interests?view=popular'>$ML{'.browse.popinterests'}</a><br />";
-    $ret .= BML::ml('.browse.popinterests.desc', {'sitename' => $LJ::SITENAMESHORT}) . "</p>";
-    $ret .= "<p><a href='$LJ::SITEROOT/syn/'>$ML{'.browse.feeds'}</a><br />";
-    $ret .= "$ML{'.browse.feeds.desc'}</p>";
-    $ret .= "</div>";
-
-    $ret .= "<div id='home'>";
-    $ret .= "<p>&raquo; <a href='$LJ::SITEROOT/'>" . BML::ml('.home', {'sitename' => $LJ::SITENAMESHORT}) . "</a></p>";
-    $ret .= "</div>";
-
-    return $ret;
-}
-_code?>
-<=body
-title=><?_ml .title _ml?>
-head<=
-<style type="text/css">
-#browse, #home {
-    margin: 20px 0;
-}
-</style>
-<=head
-<=body
-page?>
diff -r 824729656153 -r af9c31b2e8dd htdocs/postreg/find.bml.text
--- a/htdocs/postreg/find.bml.text	Thu Dec 24 07:21:01 2009 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,21 +0,0 @@
-;; -*- coding: utf-8 -*-
-
-.browse=Browse [[sitename]]
-
-.browse.feeds=Feeds
-
-.browse.feeds.desc=Add your favorite websites to your Friends page by subscribing to their RSS/Atom feeds.
-
-.browse.popinterests=Popular Interests
-
-.browse.popinterests.desc=Explore the top listed interests on [[sitename]].
-
-.home=Back to the [[sitename]] Homepage
-
-.intro=Search for people you already know or explore all of the interesting niches on [[sitename]].
-
-.nav.editprofile=Edit Profile
-
-.nav.findfriends=Find Friends and Communities
-
-.title=Getting Started
diff -r 824729656153 -r af9c31b2e8dd htdocs/postreg/index.bml
--- a/htdocs/postreg/index.bml	Thu Dec 24 07:21:01 2009 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,119 +0,0 @@
-<?page
-body<=
-<?_code
-{
-    use strict;
-    use vars qw(%POST %GET);
-    use LJ::Setting;
-
-    my $ret;
-    my $remote = LJ::get_remote()
-        or return "<?needlogin?>";
-
-    if ($remote->postreg_completed) {
-        return BML::redirect("$LJ::SITEROOT/manage/profile/");
-    }
-
-    # The settings used on this page
-    my @settings = (
-        "LJ::Setting::Name",
-        "LJ::Setting::Gender",
-        "LJ::Setting::Birthday",
-        "LJ::Setting::BirthdayDisplay",
-        "LJ::Setting::Bio",
-        "LJ::Setting::Interests",
-    );
-
-    $ret .= "<h2 style='margin-bottom:10px;'><strong>$ML{'.nav.editprofile'}</strong> &gt; $ML{'.nav.findfriends'}</h2>";
-    if ($GET{new} && $GET{new} == 1) {
-        $ret .= "<?warningbar " . BML::ml('.welcome', {'sitename' => $LJ::SITENAMESHORT, 'email' => "<strong>" . $remote->email_raw . "</strong>"}) . " warningbar?>";
-    }
-    $ret .= "<p>$ML{'.intro'}</p>";
-
-    my $save_rv;
-    if (LJ::did_post()) {
-        # redirect to the next page without saving if the user clicked that button
-        if ($POST{skip}) {
-            return BML::redirect("$LJ::SITEROOT/postreg/find");
-        }
-
-        # Save all of the settings
-        # Do not save the FriendInterests widget because the interests in the Interests
-        # setting box should always override the FriendInterests checkboxes
-        $save_rv = LJ::Setting->save_all($remote, \%POST, \@settings);
-
-        # redirect to the next page if there's no errors
-        return BML::redirect("$LJ::SITEROOT/postreg/find") 
-            unless LJ::Setting->save_had_errors($save_rv);
-    }
-
-    $ret .= LJ::Hooks::run_hook('add_extra_fields_in_postreg_settings', $remote);
-
-    # either no form has been submitted, or we had errors in the form
-    $ret .= "<form method='POST'>";
-    $ret .= "<div class='formfield-wrapper'>";
-    foreach my $setting (@settings) {
-        $ret .= "<fieldset class='nostyle pkg'>";
-
-        my $errors = $setting->errors_from_save($save_rv);
-        my $args   = $setting->args_from_save($save_rv);
-
-        $ret .= $setting->as_html($remote, $errors, $args);
-        $ret .= "</fieldset>";
-
-    }
-    $ret .= "</div>";
-    $ret .= LJ::Widget::FriendInterests->render( user => $remote, from => $remote->who_invited );
-    $ret .= "<p class='submit-wrapper'>" . LJ::html_submit('save', $ML{'.btn.save'}) . "</p>";
-    $ret .= "<p class='skip'><a href='<?siteroot?>/postreg/find'>$ML{'.skip_step_title'} &raquo;</a></p>";
-    $ret .= "</form>";
-
-    return $ret;
-}
-_code?>
-<=body
-title=><?_ml .title _ml?>
-head<=
-<style type="text/css">
-.formfield-wrapper p {
-    margin: 0 0 8px 120px;
-    line-height: 22px;
-}
-fieldset {
-    margin-bottom: 8px !important;
-}
-label {
-    float: left;
-    min-width: 120px;
-    width: 120px;
-    line-height: 22px;
-    font-weight: bold;
-}
-html>body label {
-    width: auto;
-}
-label.right {
-    min-width: 0;
-    font-weight: normal;
-    margin-right: 10px;
-}
-input.check {
-    float: left;
-}
-textarea.text {
-    margin-left: 120px;
-}
-p.submit-wrapper,
-p.skip {
-    margin-left: 120px;
-}
-#friend_interests {
-    margin-left: 120px;
-}
-#friend_interests table {
-    margin: 10px 0 0 120px;
-}
-</style>
-<=head
-<=body
-page?>
diff -r 824729656153 -r af9c31b2e8dd htdocs/postreg/index.bml.text
--- a/htdocs/postreg/index.bml.text	Thu Dec 24 07:21:01 2009 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,45 +0,0 @@
-;; -*- coding: utf-8 -*-
-
-.btn.save=Save and Continue
-
-.btn.skip=Skip This Step ->
-
-.change_account_type=Change
-
-.intro=Let others know who you are and what your journal is about! All fields are completely optional, but the more the merrier.
-
-.nav.editprofile=Edit Profile
-
-.nav.findfriends=Find Friends and Communities
-
-.setting.bio.desc=Tell us a little (or a lot) about yourself. Who you are, what your journal is about, or whatever else you want to put in here.
-
-.setting.bio.error.invalid=Invalid bio
-
-.setting.bio.note=Images, counters, and other HTML accepted.
-
-.setting.bio.question=Bio:
-
-.setting.birthday.question=Birthday:
-
-.setting.birthdaydisplay.error.invalid=You must pick one of the valid birthday display options.
-
-.setting.birthdaydisplay.question=Display:
-
-.setting.gender.error.invalid=You must pick female, male, other or unspecified.
-
-.setting.gender.question=Gender:
-
-.setting.interests.desc=List some things you're into, usually things that can complete the phrase, "I like..."
-
-.setting.interests.note=List your interests separated by commas
-
-.setting.interests.question=Interests:
-
-.setting.name.question=Display Name:
-
-.skip_step_title=Skip This Step
-
-.title=Getting Started
-
-.welcome=Welcome to [[sitename]]! Your account has been created. An email has been sent to [[email]] containing further instructions. Click on the link provided in the email, and you'll be all set.
--------------------------------------------------------------------------------

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