holyandrew (holyandrew) wrote in changelog,
holyandrew
holyandrew
changelog

[livejournal] r22909: LJSUP-13574: Public beta

Committer: akanashin
LJSUP-13574: Public beta
U   trunk/cgi-bin/LJ/User.pm
U   trunk/htdocs/userinfo.bml
Modified: trunk/cgi-bin/LJ/User.pm
===================================================================
--- trunk/cgi-bin/LJ/User.pm	2012-09-17 12:30:56 UTC (rev 22908)
+++ trunk/cgi-bin/LJ/User.pm	2012-09-17 13:56:57 UTC (rev 22909)
@@ -2094,9 +2094,11 @@
 sub profile_url {
     my ($u, %opts) = @_;
 
+    my $remote = LJ::get_remote();
+
     my $url;
     if ($u->{journaltype} eq "I") {
-        if ($LJ::DISABLED{profile_controller}) {
+        if ($LJ::DISABLED{profile_controller} || ($remote && $remote->prop('profile_ver') eq "1" && !$remote->prop('profile_ver_noswitch'))) {
             $url = "$LJ::SITEROOT/userinfo.bml?userid=$u->{'userid'}&t=I";
             $url .= "&mode=full" if $opts{full};
         } else {

Modified: trunk/htdocs/userinfo.bml
===================================================================
--- trunk/htdocs/userinfo.bml	2012-09-17 12:30:56 UTC (rev 22908)
+++ trunk/htdocs/userinfo.bml	2012-09-17 13:56:57 UTC (rev 22909)
@@ -358,7 +358,7 @@
         $body .= "<form class='b-profile-switchver' method='POST'><button class='b-profile-switchver-button' type='submit' name='new_version' value='1' ><span class='b-profile-switchver-inner'>".LJ::Lang::ml('profile.switch.to.new.version')."</span></button> " .LJ::Lang::ml('profile.switch.to.version.post'). "</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);
+            return LJ::Request->redirect($u->profile_url(), LJ::Request::HTTP_MOVED_TEMPORARILY);
         }
     }
 

Tags: akanashin, bml, 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