r39055 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r39054‎ | r39055 | r39056 >
Date:08:31, 10 August 2008
Author:krimpet
Status:old
Tags:
Comment:
Optional 'edit notices' on a per-namespace and per-page basis, per feature request 15102
Modified paths:
  • /trunk/phase3/includes/EditPage.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/EditPage.php
@@ -455,6 +455,16 @@
456456 $wgOut->addWikiMsg( 'talkpagetext' );
457457 }
458458
 459+ # Optional notices on a per-namespace and per-page basis
 460+ $editnotice_ns = 'editnotice-'.Sanitizer::escapeClass( 'ns-'.$this->mTitle->getNamespace() );
 461+ $editnotice_page = 'editnotice-'.Sanitizer::escapeClass( 'page-'.$this->mTitle->getPrefixedText() );
 462+ if ( !wfEmptyMsg( $editnotice_ns, wfMsgForContent( $editnotice_ns ) ) ) {
 463+ $wgOut->addWikiMsg( $editnotice_ns );
 464+ }
 465+ if ( !wfEmptyMsg( $editnotice_page, wfMsgForContent( $editnotice_page ) ) ) {
 466+ $wgOut->addWikiMsg( $editnotice_page );
 467+ }
 468+
459469 # Attempt submission here. This will check for edit conflicts,
460470 # and redundantly check for locked database, blocked IPs, etc.
461471 # that edit() already checked just in case someone tries to sneak

Follow-up revisions

RevisionCommit summaryAuthorDate
r39081Revert r39055 for now "Optional 'edit notices' on a per-namespace and per-pag...brion20:01, 10 August 2008

Status & tagging log