From: Andrew Garrett Date: Fri, 8 Aug 2008 10:42:38 +0000 (+0000) Subject: (bug 14002) Change cascade protection warning message to be consistent with cascade... X-Git-Tag: 1.31.0-rc.0~46023 X-Git-Url: http://git.cyclocoop.org/%24href?a=commitdiff_plain;h=e29eac028b4176d7fe38dac9679152cbb4bb8c98;p=lhc%2Fweb%2Fwiklou.git (bug 14002) Change cascade protection warning message to be consistent with cascade-protection 'blocked' message. --- diff --git a/includes/EditPage.php b/includes/EditPage.php index 160e0f1a89..4406838c5b 100644 --- a/includes/EditPage.php +++ b/includes/EditPage.php @@ -1151,14 +1151,11 @@ class EditPage { if ( $this->mTitle->isCascadeProtected() ) { # Is this page under cascading protection from some source pages? list($cascadeSources, /* $restrictions */) = $this->mTitle->getCascadeProtectionSources(); - $notice = "$1\n"; - if ( count($cascadeSources) > 0 ) { - # Explain, and list the titles responsible - foreach( $cascadeSources as $page ) { - $notice .= '* [[:' . $page->getPrefixedText() . "]]\n"; - } + $notice = ""; + foreach( $cascadeSources as $page ) { + $notice .= '* [[:' . $page->getPrefixedText() . "]]\n"; } - $wgOut->wrapWikiMsg( $notice, array( 'cascadeprotectedwarning', count($cascadeSources) ) ); + $wgOut->addWikiMsg( 'cascadeprotectedwarning', count($cascadeSources), $notice ); } if( !$this->mTitle->exists() && $this->mTitle->getRestrictions( 'create' ) != array() ){ $wgOut->addWikiMsg( 'titleprotectedwarning' );