Last modified: 2012-02-09 18:06:01 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T36284, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 34284 - Vote buttons for not-yet-logged in user.
Vote buttons for not-yet-logged in user.
Status: RESOLVED FIXED
Product: MediaWiki extensions
Classification: Unclassified
Comments (Other open bugs)
unspecified
All All
: Normal normal (vote)
: ---
Assigned To: Jack Phoenix
: patch, patch-reviewed
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-02-08 22:12 UTC by Van de Bugger
Modified: 2012-02-09 18:06 UTC (History)
1 user (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments
Proposed patch. (969 bytes, patch)
2012-02-08 22:12 UTC, Van de Bugger
Details

Description Van de Bugger 2012-02-08 22:12:32 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.
Comment 1 Jack Phoenix 2012-02-09 14:53:40 UTC
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.
Comment 2 Van de Bugger 2012-02-09 18:06:01 UTC
> 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?

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links