From: Fran Rogers Date: Sun, 10 Aug 2008 08:31:33 +0000 (+0000) Subject: Optional 'edit notices' on a per-namespace and per-page basis, per feature request... X-Git-Tag: 1.31.0-rc.0~45975 X-Git-Url: http://git.cyclocoop.org/%24href?a=commitdiff_plain;h=e5bf6e447fe92b0effe539115bec4899243dfd53;p=lhc%2Fweb%2Fwiklou.git Optional 'edit notices' on a per-namespace and per-page basis, per feature request 15102 --- diff --git a/includes/EditPage.php b/includes/EditPage.php index 160e0f1a89..59438d44ba 100644 --- a/includes/EditPage.php +++ b/includes/EditPage.php @@ -455,6 +455,16 @@ 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