vadvs (vadvs) wrote in changelog,
vadvs
vadvs
changelog

[livejournal] r16042: =LJSUP-5276: Rollback 16014, 16017, 1601...

Committer: vsukhanov
=LJSUP-5276: Rollback 16014, 16017, 16018, 16021, 16022 commits
U   trunk/bin/upgrading/en.dat
U   trunk/bin/upgrading/proplists.dat
U   trunk/cgi-bin/LJ/Widget/CreateAccount.pm
U   trunk/cgi-bin/LJ/Widget/CreateAccountProfile.pm
U   trunk/htdocs/manage/profile/index.bml
U   trunk/htdocs/manage/profile/index.bml.text
Modified: trunk/bin/upgrading/en.dat
===================================================================
--- trunk/bin/upgrading/en.dat	2009-12-15 09:43:08 UTC (rev 16041)
+++ trunk/bin/upgrading/en.dat	2009-12-15 10:01:45 UTC (rev 16042)
@@ -2026,12 +2026,6 @@
 
 feeds.text=Apparently there's good content outside of LJ?  We'll let you add [[link]] to your Friends page so you never have to leave.
 
-gender.female=Female
-
-gender.male=Male
-
-gender.specify=Specify
-
 img.btn_del=Delete
 
 img.btn_down=Down
@@ -3329,8 +3323,6 @@
 
 widget.createaccount.error.email.lj_domain=You cannot use a [[domain]] alias when creating an account.  Please enter a different email address.
 
-widget.createaccount.error.nogender=Gender must be specified.
-
 widget.createaccount.error.password.asciionly=You can only use ASCII symbols in the password.
 
 widget.createaccount.error.password.bad=Bad password:
@@ -3349,8 +3341,6 @@
 
 widget.createaccount.field.birthdate=Birthdate:
 
-widget.createaccount.field.gender=Gender:
-
 widget.createaccount.field.captcha=Prove you're human:
 
 widget.createaccount.field.captcha.hear=Type the numbers you hear:
@@ -3379,8 +3369,6 @@
 
 widget.createaccount.tip.captcha=If you can't read the text, type "audio" to take a sound test instead.
 
-widget.createaccount.tip.gender=By default we do not show your gender to anybody.
-
 widget.createaccount.tip.email=We need your email address to send important information. We will never share or sell your email address.
 
 widget.createaccount.tip.password=Choose a secure password that is at least 6 characters long. Passwords cannot be based on your username, name, or email address.

Modified: trunk/bin/upgrading/proplists.dat
===================================================================
--- trunk/bin/upgrading/proplists.dat	2009-12-15 09:43:08 UTC (rev 16041)
+++ trunk/bin/upgrading/proplists.dat	2009-12-15 10:01:45 UTC (rev 16042)
@@ -1484,4 +1484,3 @@
   datatype: char
   des: Custom user icon, to be used instead of /img/userinfo.gif in ljuser
   prettyname: Custom user icon
-

Modified: trunk/cgi-bin/LJ/Widget/CreateAccount.pm
===================================================================
--- trunk/cgi-bin/LJ/Widget/CreateAccount.pm	2009-12-15 09:43:08 UTC (rev 16041)
+++ trunk/cgi-bin/LJ/Widget/CreateAccount.pm	2009-12-15 10:01:45 UTC (rev 16042)
@@ -43,10 +43,9 @@
     $ret .= $class->start_form(%{$opts{form_attr}});
 
     my $tip_birthdate = LJ::ejs($class->ml('widget.createaccount.tip.birthdate2'));
-    my $tip_email     = LJ::ejs($class->ml('widget.createaccount.tip.email'));
-    my $tip_password  = LJ::ejs($class->ml('widget.createaccount.tip.password'));
-    my $tip_username  = LJ::ejs($class->ml('widget.createaccount.tip.username'));
-    my $tip_gender    = LJ::ejs($class->ml('widget.createaccount.tip.gender'));
+    my $tip_email = LJ::ejs($class->ml('widget.createaccount.tip.email'));
+    my $tip_password = LJ::ejs($class->ml('widget.createaccount.tip.password'));
+    my $tip_username = LJ::ejs($class->ml('widget.createaccount.tip.username'));
 
     # tip module
     if ($alt_layout) {
@@ -59,7 +58,6 @@
         $ret .= "CreateAccount.email = \"$tip_email\"\n";
         $ret .= "CreateAccount.password = \"$tip_password\"\n";
         $ret .= "CreateAccount.username = \"$tip_username\"\n";
-        $ret .= "CreateAccount.gender   = \"$tip_gender\"\n";
         $ret .= "</script>\n";
         $ret .= "<div id='tips_box_arrow'></div>";
         $ret .= "<div id='tips_box'></div>";
@@ -155,31 +153,6 @@
     $ret .= $error_msg->('confirmpass', '<br /><span class="formitemFlag">', '</span>');
     $ret .= "</td></tr>\n" unless $alt_layout;
 
-
-    ### gender
-    if ($alt_layout){
-        $ret .= "<label for='create_gender_mm' class='label_create'>" . $class->ml('widget.createaccount.field.gender') . "</label>";
-        $ret .= "<div class='bubble' id='bubble_gender'>";
-        $ret .= "<div class='bubble-arrow'></div>";
-        $ret .= "<div class='bubble-text'>$tip_gender</div>";
-        $ret .= "</div>";
-    } else {
-        $ret .= "<tr><td class='field-name'>" . $class->ml('widget.createaccount.field.gender') . "</td>\n<td>";
-    }
-    $ret .= $class->html_select(
-                name => "gender",
-                id => "create_gender",
-                selected => $post->{gender},
-                list => [ 
-                    ''  =>  LJ::Lang::ml("gender.specify"),
-                    'M' =>  LJ::Lang::ml("gender.male"),
-                    'F' =>  LJ::Lang::ml("gender.female"),
-                    ],
-                ) . " ";
-    $ret .= $error_msg->('gender', '<br /><span class="formitemFlag">', '</span>');
-    $ret .= "</td></tr>\n" unless $alt_layout;
-    
-
     ### birthdate
     if ($LJ::COPPA_CHECK) {
         if ($alt_layout) {
@@ -455,10 +428,6 @@
         $from_post{errors}->{password} = $class->ml('widget.createaccount.error.password.asciionly');
     }
 
-    ### gender check
-    $from_post{errors}->{gender} = $class->ml('widget.createaccount.error.nogender')
-        unless $post->{gender} =~ /^M|F$/;
-
     ### start COPPA_CHECK
     # age checking to determine how old they are
     if ($LJ::COPPA_CHECK) {
@@ -549,9 +518,6 @@
         );
         return $class->ml('widget.createaccount.error.cannotcreate') unless $nu;
 
-        # set gender
-        $nu->set_prop(gender => $post->{gender});
-
         if ($LJ::HUMAN_CHECK{create} && !LJ::is_enabled("recaptcha")) {
             # mark the captcha for deletion
             LJ::Captcha::expire($capid, $anum, $nu->id);

Modified: trunk/cgi-bin/LJ/Widget/CreateAccountProfile.pm
===================================================================
--- trunk/cgi-bin/LJ/Widget/CreateAccountProfile.pm	2009-12-15 09:43:08 UTC (rev 16041)
+++ trunk/cgi-bin/LJ/Widget/CreateAccountProfile.pm	2009-12-15 10:01:45 UTC (rev 16042)
@@ -54,6 +54,20 @@
     $ret .= $error_msg->('name', '<br /><span class="formitemFlag">', '</span>');
     $ret .= "</td></tr>\n";
 
+    ### gender
+    $ret .= "<tr valign='middle'><td class='field-name'>" . $class->ml('widget.createaccountprofile.field.gender') . "</td>\n<td>";
+    $ret .= $class->html_select(
+        name => 'gender',
+        selected => $post->{gender} || $u->prop('gender'),
+        list => [
+            U => LJ::Lang::ml('/manage/profile/index.bml.gender.unspecified'),
+            M => LJ::Lang::ml('/manage/profile/index.bml.gender.male'),
+            F => LJ::Lang::ml('/manage/profile/index.bml.gender.female'),
+        ],
+    );
+    $ret .= $error_msg->('gender', '<br /><span class="formitemFlag">', '</span>');
+    $ret .= "</td></tr>\n";
+
     ### location
     my %countries;
     LJ::load_codes({ "country" => \%countries});
@@ -191,6 +205,9 @@
     $post->{name} =~ s/[\n\r]//g;
     $post->{name} = LJ::text_trim($post->{name}, LJ::BMAX_NAME, LJ::CMAX_NAME);
 
+    # gender
+    $post->{gender} = 'U' unless $post->{gender} =~ m/^[UMF]$/;
+
     # location is handled by LJ::Widget::Location
 
     # interests
@@ -227,6 +244,7 @@
     unless (keys %{$from_post{errors}}) {
         LJ::update_user($u, { name => $post->{name} });
         $u->invalidate_directory_record;
+        $u->set_prop('gender', $post->{gender});
         $u->set_interests($old_interests, \@valid_ints);
         $u->set_bio($post->{bio}, $post->{bio_absent});
     }

Modified: trunk/htdocs/manage/profile/index.bml
===================================================================
--- trunk/htdocs/manage/profile/index.bml	2009-12-15 09:43:08 UTC (rev 16041)
+++ trunk/htdocs/manage/profile/index.bml	2009-12-15 10:01:45 UTC (rev 16042)
@@ -153,7 +153,9 @@
         $ret .= "<tr><td class='field_name'>$ML{'.fn.gender'}</td><td>";
         $ret .= LJ::html_select({ 'name' => 'gender', 'selected' => $u->{'gender'} },
                                   'U' => $ML{'.gender.unspecified'}, 'M' => $ML{'.gender.male'}, 'F' => $ML{'.gender.female'} );
+        $ret .= "</td></tr>\n";
 
+
         # birthday
         $ret .= "<tr><td class='field_name'>$ML{'.fn.birthday'}</td><td>";
         my %bdpart;
@@ -580,11 +582,6 @@
             push @errors, $ML{'.error.bio.toolong'};
         }
 
-        # gender
-        unless ($POST{gender} =~ /^F|M$/){
-            push @errors => $ML{'.error.gender.not_specified'};
-        }
-
         # text messaging
         if ($POST{'txtmsg_security'} =~ m/^(all|reg|friends)$/) {
             unless ($POST{'txtmsg_provider'}) {
@@ -663,6 +660,7 @@
             $POST{'opt_showmutualfriends'} = $POST{'opt_showmutualfriends'} ? 1 : 0;
             $POST{'opt_hidefriendofs'} = $POST{'opt_hidefriendofs'} ? 0 : 1;
             $POST{'opt_showschools'} = 'N' unless $POST{'opt_showschools'} =~ m/^(N|R|Y|F)$/;
+            $POST{'gender'} = 'U' unless $POST{'gender'} =~ m/^[UMF]$/;
             $POST{'opt_sharebday'} = undef unless $POST{'opt_sharebday'} =~ m/^(A|F|N|R)$/;
             $POST{'opt_showbday'} = 'D' unless $POST{'opt_showbday'} =~ m/^(D|F|N|Y)$/;
             # undefined means show to everyone, "N" means don't show

Modified: trunk/htdocs/manage/profile/index.bml.text
===================================================================
--- trunk/htdocs/manage/profile/index.bml.text	2009-12-15 09:43:08 UTC (rev 16041)
+++ trunk/htdocs/manage/profile/index.bml.text	2009-12-15 10:01:45 UTC (rev 16042)
@@ -57,8 +57,6 @@
 
 .error.findbyemail=Invalid option for find by email.
 
-.error.gender.not_specified=Gender must be specified.
-
 .error.invalidbio=Your stored bio contains invalid characters. You must visit the <a [[aopts]]><b>conversion page</b></a> to convert it to Unicode.
 
 .error.invalidname2=Your name contains invalid characters. You must visit the <a [[aopts]]><b>conversion page</b></a> to convert it to Unicode.
@@ -213,8 +211,6 @@
 
 .share.birthday=Show your Birthday to:
 
-.share.gender=Shaw your Gender to:
-
 .show.birthday=Birthday display options:
 
 .show.birthday.day=Display only the month and day

  • Post a new comment

    Error

    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

    Your IP address will be recorded 

  • 0 comments