Page MenuHomePhabricator

Wrap cannotdelete Msg
Closed, ResolvedPublic

Description

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.


Version: 1.16.x
Severity: enhancement

attachment bug_21046.patch ignored as obsolete

Details

Reference
bz21047

Related Objects

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 10:51 PM
bzimport set Reference to bz21047.
bzimport added a subscriber: Unknown Object (MLST).
IAlex added a comment.Oct 14 2009, 9:38 PM

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...

IAlex added a comment.Oct 15 2009, 9:48 PM

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().

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.

Attached:

Modified patch applied with r58021.