From: Brion Vibber Date: Sun, 10 Aug 2008 20:01:38 +0000 (+0000) Subject: Revert r39055 for now "Optional 'edit notices' on a per-namespace and per-page basis... X-Git-Tag: 1.31.0-rc.0~45964 X-Git-Url: http://git.cyclocoop.org/?a=commitdiff_plain;h=bd4245c32e7694c07a26ce5691d040bc0b78dcb2;p=lhc%2Fweb%2Fwiklou.git Revert r39055 for now "Optional 'edit notices' on a per-namespace and per-page basis, per feature request 15102" Sanitizer::escapeClass() isn't really suitable for constructing message key names; a lot of names won't be easy to predict and it would be difficult for people to set up a custom message for, say, a page name containing punctuation or non-ASCII characters. The check for message availability is using wfMsgForContent() for the content language, but then the output is done via $wgOut->addWikiMsg() which will use the UI language. Is this the desired behavior? --- diff --git a/includes/EditPage.php b/includes/EditPage.php index 59438d44ba..160e0f1a89 100644 --- a/includes/EditPage.php +++ b/includes/EditPage.php @@ -455,16 +455,6 @@ class EditPage { $wgOut->addWikiMsg( 'talkpagetext' ); } - # Optional notices on a per-namespace and per-page basis - $editnotice_ns = 'editnotice-'.Sanitizer::escapeClass( 'ns-'.$this->mTitle->getNamespace() ); - $editnotice_page = 'editnotice-'.Sanitizer::escapeClass( 'page-'.$this->mTitle->getPrefixedText() ); - if ( !wfEmptyMsg( $editnotice_ns, wfMsgForContent( $editnotice_ns ) ) ) { - $wgOut->addWikiMsg( $editnotice_ns ); - } - if ( !wfEmptyMsg( $editnotice_page, wfMsgForContent( $editnotice_page ) ) ) { - $wgOut->addWikiMsg( $editnotice_page ); - } - # Attempt submission here. This will check for edit conflicts, # and redundantly check for locked database, blocked IPs, etc. # that edit() already checked just in case someone tries to sneak