Last modified: 2007-06-30 04:23:25 UTC

Wikimedia Bugzilla is closed!

Wikimedia has migrated from Bugzilla to Phabricator. Bug reports should be created and updated in Wikimedia Phabricator instead. Please create an account in Phabricator and add your Bugzilla email address to it.
Wikimedia Bugzilla is read-only. If you try to edit or create any bug report in Bugzilla you will be shown an intentional error message.
In order to access the Phabricator task corresponding to a Bugzilla report, just remove "static-" from its URL.
You could still run searches in Bugzilla or access your list of votes but bug reports will obviously not be up-to-date in Bugzilla.
Bug 10404 - Link to rights logs for users when using Special:userrights
Link to rights logs for users when using Special:userrights
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
Special pages (Other open bugs)
1.11.x
All All
: Normal enhancement (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2007-06-29 08:30 UTC by Matt
Modified: 2007-06-30 04:23 UTC (History)
1 user (show)

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


Attachments
The code (1.64 KB, patch)
2007-06-29 08:30 UTC, Matt
Details
Patch V2 (2.02 KB, patch)
2007-06-29 09:08 UTC, Matt
Details
Patch V3 (3.18 KB, patch)
2007-06-29 10:07 UTC, Matt
Details

Description Matt 2007-06-29 08:30:32 UTC
Created attachment 3841 [details]
The code

This is my first attempt at a patch for MediaWiki, so it is a small change.

This patch adds a (view log) link next to the users name on Special:userrights. This interface is used usually by stewards. The text is cusomizable by the system message "userrights-loglinktext", which by default is set to "view log".

Thanks!
Comment 1 Rob Church 2007-06-29 08:32:40 UTC
You seem to be calling a parse operation in order to build a simple link. Investigate the Linker and Skin classes.
Comment 2 Matt 2007-06-29 08:36:16 UTC
(In reply to comment #1)
> You seem to be calling a parse operation in order to build a simple link.
> Investigate the Linker and Skin classes.
> 

Ok, is the parse operation too expensive? I'll try it another way.
Comment 3 Rob Church 2007-06-29 08:37:39 UTC
By comparison, yes. It's also a very sloppy way of doing it - we don't build UI links in that fashion.

I would recommend that, rather than just linking to the rights log, you investigate the possibility of adding the log fragment at the bottom of the page when a valid target is specified.
Comment 4 Matt 2007-06-29 09:07:56 UTC
(In reply to comment #3)
> By comparison, yes. It's also a very sloppy way of doing it - we don't build UI
> links in that fashion.
> 
> I would recommend that, rather than just linking to the rights log, you
> investigate the possibility of adding the log fragment at the bottom of the
> page when a valid target is specified.
> 

I'll investigate adding a fragment on the bottom, I don't know whether this would invlove similair things to transclusion, i'm supposing I can't just go $wgOut->parse("{{Special:Log/rights?page=User:NAME}");.

I am attaching another patch, using Linker as well as several other tweaks. It works a lot better now.
Comment 5 Matt 2007-06-29 09:08:30 UTC
Created attachment 3843 [details]
Patch V2
Comment 6 Rob Church 2007-06-29 09:10:16 UTC
You don't instantiate Linker; use a Skin instead. The current user's Skin can be obtained using `$GLOBALS['wgUser']->getSkin()`
Comment 7 Matt 2007-06-29 10:07:24 UTC
Created attachment 3844 [details]
Patch V3

This has some benefits, it shows the log in the page, and is properly customizable. It also uses the users skin instead of a new Linker.
Comment 8 Rob Church 2007-06-30 04:23:25 UTC
Fixed in r23580. I couldn't use the provided patch, however; it didn't honour the safe construction of localised titles, abused Linker::makeKnownLink() [deprecated], and contained odd bits like appending a misplaced </div> in the log fragment function.

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


Navigation
Links