Last modified: 2007-08-22 08:56:09 UTC
Even without having the +sysop permission, when you click on a URL (such as the one provided), it will display the text "View or restore deleted edit(s)?," but only when a filename has been passed through the URL; such as in this example, with $wpDestFile=Bla.jpg. While clicking on it does return a "Admin only" page, wouldn't it be better to not display that text at all? When I get to my MediaWiki installation at work, I'll try to write up a patch and post it here.
This seems to be produced by a bad template hack on en.wikipedia.org: http://en.wikipedia.org/wiki/MediaWiki:Uploadtext If the code produced the link itself, it would be able respond more appropriately.
It would make more sense to have MediaWiki generate that and not a template. Although, what about the idea of adding a ParserFunction for "ifadmin?"
outputting/omitting text based on user groups can not work with parser cache enabled. the only possibility i see would be to attach css-classes representing user groups to the <body> tag. For example, sysops would have the group-sysop class set there. you could then apply a class like sysops-only to a section of text, and define styles for those classes in MediaWiki:common.css, to the effect that the text is hidden to everyone but sysops.
That could work, but I suppose that'd only help for situations when you'd want it within a template or something. In this particular situation, I think that this text should be moved to MediaWiki and out of a template.
* Don't use CSS to change the *meaning* of a page * It makes sense to introduce the link through software
Fixed in r25042, r25043.