Last modified: 2009-10-22 16:54:10 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 T23047, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 21047 - Wrap cannotdelete Msg
Wrap cannotdelete Msg
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
Interface (Other open bugs)
1.16.x
All All
: Normal enhancement (vote)
: ---
Assigned To: Nobody - You can work on this!
: easy, patch
Depends on:
Blocks: 18819
  Show dependency treegraph
 
Reported: 2009-10-07 22:01 UTC by Platonides
Modified: 2009-10-22 16:54 UTC (History)
2 users (show)

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


Attachments
cannotdelete message (1.06 KB, patch)
2009-10-07 22:01 UTC, Platonides
Details
Using showFatalError() (1.11 KB, patch)
2009-10-16 15:43 UTC, Platonides
Details

Description Platonides 2009-10-07 22:01:40 UTC
Created attachment 6645 [details]
cannotdelete message

The attached patch wraps the cannotdelete message with mw-error-cannotdelete id, and adds a $1 parameter with the name of the page whose deletion was attempted.
Comment 1 Alexandre Emsenhuber [IAlex] 2009-10-14 21:38:22 UTC
Two comments:
* $wgOut->showFatalError() does more than just adding the text to the output, such as title
* You can already have the page's name with {{PAGENAME}}, why do you need a $1 parameter?
Comment 2 Platonides 2009-10-14 22:00:49 UTC
Are the differences significative? Note that wrapWikiMsg() is used in that file for something similar a bit above.
Not really needed. Leave it out if you want. It made sense to have it as a parameter, even if it could be fetched from somewhere else. It's not usually a good idea to include {{PAGENAME}} in messages...
Comment 3 Alexandre Emsenhuber [IAlex] 2009-10-15 21:48:22 UTC
I'm not speaking about cannotdelete's text, but the other things that $wgOut->showFatalError() does, such as changing page's title, robot policy, etc. that are not done by $wgOut->wrapWikiMsg().
Comment 4 Platonides 2009-10-16 15:43:30 UTC
Created attachment 6675 [details]
Using showFatalError()

The page title is not really relevant here (Delete "Foo" instead of "Internal Error"). 
The robot policy is, since this message not only happens after posting (the most 
common case) but also when following an action=delete url.
The easiest way to do it while still using showFatalError seems to be concatenating the tags around the cannotdelete.
Comment 5 Raimond Spekking 2009-10-22 16:54:10 UTC
Modified patch applied with r58021.

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


Navigation
Links