Changeset 2544
- Timestamp:
- 06/11/08 00:07:07 (5 months ago)
- Files:
-
- branches/release-39/default_templates/javascript.mtml (modified) (1 diff)
- branches/release-39/default_templates/signin.mtml (modified) (1 diff)
- branches/release-39/lib/MT/App/Comments.pm (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
branches/release-39/default_templates/javascript.mtml
r2532 r2544 568 568 var user_link; 569 569 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 ); 573 571 user_link += '">' + u.name + '</a>'; 574 572 } else { branches/release-39/default_templates/signin.mtml
r2394 r2544 24 24 if (u.is_authenticated) { 25 25 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 ); 28 28 } else { 29 29 url = u.url; branches/release-39/lib/MT/App/Comments.pm
r2535 r2544 1628 1628 my $app = shift; 1629 1629 1630 my ( $sess_obj, $commenter ) = $app-> _get_commenter_session();1630 my ( $sess_obj, $commenter ) = $app->get_commenter_session(); 1631 1631 if ($commenter) { 1632 $app->{session} = $sess_obj; 1633 1632 1634 my $url; 1633 1635 my $entry_id = $app->param('entry_id'); … … 1639 1641 } 1640 1642 else { 1641 $url = is_valid_url( $app->param('static') );1643 $url = is_valid_url( $app->param('static') || $app->param('return_url') ); 1642 1644 } 1643 1645 1644 1646 my $blog_id = $app->param('blog_id'); 1645 $app->{session} = $sess_obj; 1647 1646 1648 $app->user($commenter); 1647 1649 my $param = { … … 1666 1668 my $q = $app->param; 1667 1669 1668 my ( $sess_obj, $cmntr ) = $app-> _get_commenter_session();1670 my ( $sess_obj, $cmntr ) = $app->get_commenter_session(); 1669 1671 return $app->handle_error( $app->translate('Invalid login') ) 1670 1672 unless $cmntr;
