Index: trunk/extensions/Comments/CommentClass.php |
— | — | @@ -669,7 +669,7 @@ |
670 | 670 | } |
671 | 671 | |
672 | 672 | function getVoteLink( $commentID, $voteType ) { |
673 | | - global $wgUser, $wgScriptPath; |
| 673 | + global $wgUser, $wgScriptPath, $wgOut; |
674 | 674 | |
675 | 675 | // Blocked users cannot vote, obviously |
676 | 676 | if( $wgUser->isBlocked() ) { |
— | — | @@ -684,7 +684,10 @@ |
685 | 685 | } else { |
686 | 686 | // Anonymous users need to log in before they can vote |
687 | 687 | $login = SpecialPage::getTitleFor( 'Userlogin' ); |
688 | | - $voteLink .= "<a href=\"{$login->escapeFullURL()}\" rel=\"nofollow\">"; |
| 688 | + $voteLink .= |
| 689 | + "<a href=\"" . |
| 690 | + $login->escapeLocalURL( array( 'returnto' => $wgOut->getTitle()->getDBkey() ) ) . |
| 691 | + "\" rel=\"nofollow\">"; |
689 | 692 | } |
690 | 693 | |
691 | 694 | $imagePath = $wgScriptPath . '/extensions/Comments/images'; |