wisest owl (wisest_owl) wrote in changelog,
wisest owl
wisest_owl
changelog

[ljcom] r10582: LJSUP-8927. Redirect to ONTD info page f...

Committer: gprochaev
LJSUP-8927. Redirect to ONTD info page from create account page

U   trunk/cgi-bin/LJ/Hooks/CreatePage.pm
U   trunk/cgi-bin/LJ/Widget/CreateAccountLevel.pm
U   trunk/htdocs/create/step2a.bml
Modified: trunk/cgi-bin/LJ/Hooks/CreatePage.pm
===================================================================
--- trunk/cgi-bin/LJ/Hooks/CreatePage.pm	2011-05-31 04:32:40 UTC (rev 10581)
+++ trunk/cgi-bin/LJ/Hooks/CreatePage.pm	2011-05-31 06:35:32 UTC (rev 10582)
@@ -125,6 +125,7 @@
 LJ::register_hook("create.bml_postsession", sub {
     my $ar = shift;
     my $post = $ar->{post};
+    my $from = $ar->{from};
     my $redir = $ar->{redirect};
     my $u = $ar->{u};
 
@@ -156,6 +157,7 @@
     return 1 if LJ::is_enabled("basic_signup") && $atype eq 'free' && !$u->is_person;
 
     $$redir = "$LJ::SITEROOT/create/thanks.bml";
+    $$redir = "$LJ::ONTD_THANKS_URL" if $from =~ /ontdi(?:phone|pad)/;
     return 1 if LJ::is_enabled("basic_signup") && $atype eq 'free' && !$u->underage;
 
     if ($atype eq 'paid') {

Modified: trunk/cgi-bin/LJ/Widget/CreateAccountLevel.pm
===================================================================
--- trunk/cgi-bin/LJ/Widget/CreateAccountLevel.pm	2011-05-31 04:32:40 UTC (rev 10581)
+++ trunk/cgi-bin/LJ/Widget/CreateAccountLevel.pm	2011-05-31 06:35:32 UTC (rev 10582)
@@ -33,6 +33,7 @@
         post => $post,
         u => $remote,
         redirect => \$redirect,
+        %$from_post,
     });
 
     $redirect ||= "$LJ::SITEROOT/manage/profile/";

Modified: trunk/htdocs/create/step2a.bml
===================================================================
--- trunk/htdocs/create/step2a.bml	2011-05-31 04:32:40 UTC (rev 10581)
+++ trunk/htdocs/create/step2a.bml	2011-05-31 06:35:32 UTC (rev 10582)
@@ -38,10 +38,12 @@
             next unless $field =~ /^Widget\[CreateAccountLevel\]_/;
             $post_fields_for_level{$field} = $POST{$field};
         }
+        $from_post{'from'} = $GET{'from'};
         LJ::Widget->handle_post(\%post_fields_for_level, ( "CreateAccountLevel", { from_post => \%from_post }));
         LJ::run_hooks('profile_save', $u);
     }
 
+    $from_post{'from'} = $GET{'from'};
     my $ret;
 
     $ret .= "<div id='create-page'>";
@@ -55,7 +57,7 @@
     $ret .= "<tr valign='top'><td style='padding-right: 10px;'>";
 
     $ret .= LJ::Widget::CreateAccountProfile->render( from_post => \%from_post );
-    $ret .= LJ::Widget::CreateAccountLevel->render;
+    $ret .= LJ::Widget::CreateAccountLevel->render( from_post => \%from_post );
 
     $ret .= "</td><td width='300'>";
 

Tags: bml, ljcom, pm, wisest-owl
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