Last modified: 2007-08-22 08:56:09 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 9002 - Add link to view/restore deleted edits on Special:Upload when a destination filename is provided
Add link to view/restore deleted edits on Special:Upload when a destination f...
Product: MediaWiki
Classification: Unclassified
Uploading (Other open bugs)
All All
: Normal enhancement (vote)
: ---
Assigned To: Nobody - You can work on this!
: easy
Depends on:
  Show dependency treegraph
Reported: 2007-02-16 19:46 UTC by Chad H.
Modified: 2007-08-22 08:56 UTC (History)
0 users

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


Description Chad H. 2007-02-16 19:46:18 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.
Comment 1 Brion Vibber 2007-02-17 00:48:27 UTC
This seems to be produced by a bad template hack on

If the code produced the link itself, it would be able respond more appropriately.
Comment 2 Chad H. 2007-02-17 16:05:21 UTC
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?"
Comment 3 Daniel Kinzler 2007-02-17 16:20:35 UTC
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.
Comment 4 Chad H. 2007-02-17 16:25:22 UTC
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.
Comment 5 Rob Church 2007-02-17 17:59:22 UTC
* Don't use CSS to change the *meaning* of a page
* It makes sense to introduce the link through software
Comment 6 Rob Church 2007-08-22 08:56:09 UTC
Fixed in r25042, r25043.

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