From e29eac028b4176d7fe38dac9679152cbb4bb8c98 Mon Sep 17 00:00:00 2001 From: Andrew Garrett Date: Fri, 8 Aug 2008 10:42:38 +0000 Subject: [PATCH] (bug 14002) Change cascade protection warning message to be consistent with cascade-protection 'blocked' message. --- includes/EditPage.php | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) 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' ); -- 2.20.1