(bug 14002) Change cascade protection warning message to be consistent with cascade...
authorAndrew Garrett <werdna@users.mediawiki.org>
Fri, 8 Aug 2008 10:42:38 +0000 (10:42 +0000)
committerAndrew Garrett <werdna@users.mediawiki.org>
Fri, 8 Aug 2008 10:42:38 +0000 (10:42 +0000)
includes/EditPage.php

index 160e0f1..4406838 100644 (file)
@@ -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' );