
krimpet at svn
Aug 10, 2008, 1:31 AM
Post #1 of 1
(63 views)
Permalink
|
|
SVN: [39055] trunk/phase3/includes/EditPage.php
|
|
Revision: 39055 Author: krimpet Date: 2008-08-10 08:31:33 +0000 (Sun, 10 Aug 2008) Log Message: ----------- Optional 'edit notices' on a per-namespace and per-page basis, per feature request 15102 Modified Paths: -------------- trunk/phase3/includes/EditPage.php Modified: trunk/phase3/includes/EditPage.php =================================================================== --- trunk/phase3/includes/EditPage.php 2008-08-10 08:29:05 UTC (rev 39054) +++ trunk/phase3/includes/EditPage.php 2008-08-10 08:31:33 UTC (rev 39055) @@ -455,6 +455,16 @@ $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 _______________________________________________ MediaWiki-CVS mailing list MediaWiki-CVS[at]lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs
|