r38879 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r38878‎ | r38879 | r38880 >
Date:10:42, 8 August 2008
Author:werdna
Status:old
Tags:
Comment:
(bug 14002) Change cascade protection warning message to be consistent with cascade-protection 'blocked' message.
Modified paths:
  • /trunk/phase3/includes/EditPage.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/EditPage.php
@@ -1151,14 +1151,11 @@
11521152 if ( $this->mTitle->isCascadeProtected() ) {
11531153 # Is this page under cascading protection from some source pages?
11541154 list($cascadeSources, /* $restrictions */) = $this->mTitle->getCascadeProtectionSources();
1155 - $notice = "$1\n";
1156 - if ( count($cascadeSources) > 0 ) {
1157 - # Explain, and list the titles responsible
1158 - foreach( $cascadeSources as $page ) {
1159 - $notice .= '* [[:' . $page->getPrefixedText() . "]]\n";
1160 - }
 1155+ $notice = "";
 1156+ foreach( $cascadeSources as $page ) {
 1157+ $notice .= '* [[:' . $page->getPrefixedText() . "]]\n";
11611158 }
1162 - $wgOut->wrapWikiMsg( $notice, array( 'cascadeprotectedwarning', count($cascadeSources) ) );
 1159+ $wgOut->addWikiMsg( 'cascadeprotectedwarning', count($cascadeSources), $notice );
11631160 }
11641161 if( !$this->mTitle->exists() && $this->mTitle->getRestrictions( 'create' ) != array() ){
11651162 $wgOut->addWikiMsg( 'titleprotectedwarning' );

Follow-up revisions

RevisionCommit summaryAuthorDate
r38958Revert r38879, 38880 "(bug 14002) Change cascade protection warning message t...brion21:56, 8 August 2008

Status & tagging log