r40674 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r40673‎ | r40674 | r40675 >
Date:19:53, 9 September 2008
Author:ialex
Status:old
Tags:
Comment:
Add the list of restrictions to the "titleprotectedwarning" message. For now, there should be one and only one item in that array.
Modified paths:
  • /trunk/phase3/includes/EditPage.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/EditPage.php
@@ -1221,8 +1221,8 @@
12221222 }
12231223 $wgOut->wrapWikiMsg( $notice, array( 'cascadeprotectedwarning', count($cascadeSources) ) );
12241224 }
1225 - if( !$this->mTitle->exists() && $this->mTitle->getRestrictions( 'create' ) != array() ){
1226 - $wgOut->addWikiMsg( 'titleprotectedwarning' );
 1225+ if( !$this->mTitle->exists() && ( $createRestrictions = $this->mTitle->getRestrictions( 'create' ) ) != array() ){
 1226+ $wgOut->addWikiMsgArray( 'titleprotectedwarning', $createRestrictions );
12271227 }
12281228
12291229 if( $this->kblength === false ) {

Follow-up revisions

RevisionCommit summaryAuthorDate
r40899* Reverted code style change made by Aaron, "if (" -> "if("...tstarling04:59, 16 September 2008