Index: trunk/phase3/includes/EditPage.php |
— | — | @@ -1151,11 +1151,14 @@ |
1152 | 1152 | if ( $this->mTitle->isCascadeProtected() ) { |
1153 | 1153 | # Is this page under cascading protection from some source pages? |
1154 | 1154 | list($cascadeSources, /* $restrictions */) = $this->mTitle->getCascadeProtectionSources(); |
1155 | | - $notice = ""; |
1156 | | - foreach( $cascadeSources as $page ) { |
1157 | | - $notice .= '* [[:' . $page->getPrefixedText() . "]]\n"; |
| 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 | + } |
1158 | 1161 | } |
1159 | | - $wgOut->addWikiMsg( 'cascadeprotectedwarning', count($cascadeSources), $notice ); |
| 1162 | + $wgOut->wrapWikiMsg( $notice, array( 'cascadeprotectedwarning', count($cascadeSources) ) ); |
1160 | 1163 | } |
1161 | 1164 | if( !$this->mTitle->exists() && $this->mTitle->getRestrictions( 'create' ) != array() ){ |
1162 | 1165 | $wgOut->addWikiMsg( 'titleprotectedwarning' ); |
Index: trunk/phase3/languages/messages/MessagesEn.php |
— | — | @@ -1150,8 +1150,7 @@ |
1151 | 1151 | You may wish to cut-n-paste the text into a text file and save it for later.</strong>', |
1152 | 1152 | 'protectedpagewarning' => '<strong>WARNING: This page has been locked so that only users with sysop privileges can edit it.</strong>', |
1153 | 1153 | 'semiprotectedpagewarning' => "'''Note:''' This page has been locked so that only registered users can edit it.", |
1154 | | -'cascadeprotectedwarning' => "'''Warning:''' This page has been locked so that only users with sysop privileges can edit it, because it is included in the following cascade-protected {{PLURAL:$1|page|pages}}: |
1155 | | -$2", |
| 1154 | +'cascadeprotectedwarning' => "'''Warning:''' This page has been locked so that only users with sysop privileges can edit it, because it is included in the following cascade-protected {{PLURAL:$1|page|pages}}:", |
1156 | 1155 | 'titleprotectedwarning' => '<strong>WARNING: This page has been locked so that only some users can create it.</strong>', |
1157 | 1156 | 'templatesused' => 'Templates used on this page:', |
1158 | 1157 | 'templatesusedpreview' => 'Templates used in this preview:', |