holyandrew (holyandrew) wrote in changelog,
holyandrew
holyandrew
changelog

[livejournal] r22874: LJSUP-13574: Public beta

Committer: akanashin
LJSUP-13574: Public beta
U   trunk/bin/upgrading/proplists.dat
U   trunk/cgi-bin/Apache/LiveJournal.pm
U   trunk/cgi-bin/LJ/Widget/CreateAccount.pm
U   trunk/htdocs/userinfo.bml
Modified: trunk/bin/upgrading/proplists.dat
===================================================================
--- trunk/bin/upgrading/proplists.dat	2012-09-12 11:17:11 UTC (rev 22873)
+++ trunk/bin/upgrading/proplists.dat	2012-09-12 11:28:29 UTC (rev 22874)
@@ -902,6 +902,22 @@
   multihomed: 0
   prettyname: Profile Page Collapsed Headers
 
+userproplist.profile_ver:
+  cldversion: 0
+  datatype: num
+  des: Version of profile page
+  indexed: 0
+  multihomed: 0
+  prettyname: Profile page version
+
+userproplist.profile_ver_noswitch:
+  cldversion: 0
+  datatype: bool
+  des: True if user can't switch profile page to old version
+  indexed: 0
+  multihomed: 0
+  prettyname: New profile version
+
 userproplist.public_key:
   cldversion: 4
   datatype: blobchar

Modified: trunk/cgi-bin/Apache/LiveJournal.pm
===================================================================
--- trunk/cgi-bin/Apache/LiveJournal.pm	2012-09-12 11:17:11 UTC (rev 22873)
+++ trunk/cgi-bin/Apache/LiveJournal.pm	2012-09-12 11:28:29 UTC (rev 22874)
@@ -767,7 +767,7 @@
             return redir($u->profile_url . $mode);
         }
 
-        if ($opts->{'mode'} eq "profile" && $LJ::DISABLED{profile_controller} && $GET{'ver'} ne '3') {
+        if ($opts->{'mode'} eq "profile") {
             my $burl = LJ::remote_bounce_url();
             return remote_domsess_bounce() if LJ::remote_bounce_url();
 

Modified: trunk/cgi-bin/LJ/Widget/CreateAccount.pm
===================================================================
--- trunk/cgi-bin/LJ/Widget/CreateAccount.pm	2012-09-12 11:17:11 UTC (rev 22873)
+++ trunk/cgi-bin/LJ/Widget/CreateAccount.pm	2012-09-12 11:28:29 UTC (rev 22874)
@@ -629,6 +629,9 @@
 
         $nu->make_login_session;
 
+        $nu->set_prop("profile_ver", 2);
+        $nu->set_prop("noswitch_profile_ver", 1);
+
         # Default new accounts to Plus level
         $nu->add_to_class('plus');
         $nu->set_prop("create_accttype", "plus");

Modified: trunk/htdocs/userinfo.bml
===================================================================
--- trunk/htdocs/userinfo.bml	2012-09-12 11:17:11 UTC (rev 22873)
+++ trunk/htdocs/userinfo.bml	2012-09-12 11:28:29 UTC (rev 22874)
@@ -352,6 +352,16 @@
 
     $body .= "<div id='profile_page'>";
 
+    my $url = LJ::Request->uri();
+    # Page version switcher
+    if ($remote && !$remote->prop('profile_ver_noswitch')) {
+        $body .= "<form method='POST'><input type='submit' name='new_version' value='".LJ::Lang::ml('profile.switch.to.new.version')."' ></form>";
+        if (LJ::did_post() && LJ::Request->post_param('new_version')) {
+            $remote->set_prop('profile_ver', 2);
+            return LJ::Request->redirect($url, LJ::Request::HTTP_MOVED_TEMPORARILY);
+        }
+    }
+
     if ($com) {
         my $pt;
         my $userinfo_join_community;

Tags: akanashin, bml, dat, holyandrew, livejournal, pm
Subscribe
  • 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