Last modified: 2009-10-22 16:54:10 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.
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?
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...
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().
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.
Modified patch applied with r58021.