Last modified: 2012-02-09 18:06:01 UTC
Created attachment 9972 [details] Proposed patch. Vote buttons send not-yet-logged-in user to login page, but after login user is not redirected back to original page. Proposed patch fixes the problem: after logging in user is redirected back to original page.
Using $wgOut there feels a tad bit icky, but then again, I don't have a better alternative... - $login = SpecialPage::getTitleFor( 'Userlogin' ); - $voteLink .= "<a href=\"{$login->escapeFullURL()}\" rel=\"nofollow\">"; + $login = SpecialPage::getTitleFor( 'UserLogin' ); One small nitpick: SpecialPage::getTitleFor() expects the *canonical* special page name (which is usually /not/ CamelCase), so that it'll return the correct output even for non-English languages. In any case, thanks for the patch once again! I've applied it in r111040.
> Using $wgOut there feels a tad bit icky... Let us consider another variant: Removing voting buttons if user is not logged in. It is not so bad, because voting buttons may be misleading. For example: user is not logged in, s/he see voting buttons, click one, logging in, getting back... and do not have voting buttons at all, because s/he does not have "comment" right. (Oops, it is a subject of my next report.) What do you think?