Changeset 2544

Show
Ignore:
Timestamp:
06/11/08 00:07:07 (5 months ago)
Author:
bchoate
Message:

Updated params for edit_profile links. BugId:80050

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/release-39/default_templates/javascript.mtml

    r2532 r2544  
    568568            var user_link; 
    569569            if ( u.is_author ) { 
    570                 user_link = '<a href="<$mt:CGIPath$><$mt:CommentScript$>?__mode=edit_profile&blog_id=<$mt:BlogID$>'; 
    571                 if (entry_id) 
    572                     user_link += '&entry_id=' + entry_id; 
     570                user_link = '<a href="<$mt:CGIPath$><$mt:CommentScript$>?__mode=edit_profile&return_url=' + encodeURIComponent( location.href ); 
    573571                user_link += '">' + u.name + '</a>'; 
    574572            } else { 
  • branches/release-39/default_templates/signin.mtml

    r2394 r2544  
    2424        if (u.is_authenticated) { 
    2525            if (u.is_author) { 
    26                 url = '<$mt:CGIPath$><$mt:CommentScript$>?__mode=edit_profile&blog_id=<$mt:BlogID$>'; 
    27                 url += '&static=' + escape( location.href ); 
     26                url = '<$mt:CGIPath$><$mt:CommentScript$>?__mode=edit_profile'; 
     27                url += '&return_url=' + encodeURIComponent( location.href ); 
    2828            } else { 
    2929                url = u.url; 
  • branches/release-39/lib/MT/App/Comments.pm

    r2535 r2544  
    16281628    my $app = shift; 
    16291629 
    1630     my ( $sess_obj, $commenter ) = $app->_get_commenter_session(); 
     1630    my ( $sess_obj, $commenter ) = $app->get_commenter_session(); 
    16311631    if ($commenter) { 
     1632        $app->{session} = $sess_obj; 
     1633 
    16321634        my $url; 
    16331635        my $entry_id = $app->param('entry_id'); 
     
    16391641        } 
    16401642        else { 
    1641             $url = is_valid_url( $app->param('static') ); 
     1643            $url = is_valid_url( $app->param('static') || $app->param('return_url') ); 
    16421644        } 
    16431645 
    16441646        my $blog_id = $app->param('blog_id'); 
    1645         $app->{session} = $sess_obj; 
     1647 
    16461648        $app->user($commenter); 
    16471649        my $param = { 
     
    16661668    my $q   = $app->param; 
    16671669 
    1668     my ( $sess_obj, $cmntr ) = $app->_get_commenter_session(); 
     1670    my ( $sess_obj, $cmntr ) = $app->get_commenter_session(); 
    16691671    return $app->handle_error( $app->translate('Invalid login') ) 
    16701672        unless $cmntr;