r38958 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r38957‎ | r38958 | r38959 >
Date:21:56, 8 August 2008
Author:brion
Status:old
Tags:
Comment:
Revert r38879, 38880 "(bug 14002) Change cascade protection warning message to be consistent with cascade-protection 'blocked' message."
Incompatible change to message, and just seems kind of ugly. It's usually easier to maintain the core message without having to remember to slap "and the bit that always follows it" on the end every time.
Probably the other message referred to should be fixed to follow general conventions, rather than this one changed to break them. :)
Modified paths:
  • /trunk/phase3/includes/EditPage.php (modified) (history)
  • /trunk/phase3/languages/messages/MessagesEn.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/EditPage.php
@@ -1151,11 +1151,14 @@
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 = "";
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+ }
11581161 }
1159 - $wgOut->addWikiMsg( 'cascadeprotectedwarning', count($cascadeSources), $notice );
 1162+ $wgOut->wrapWikiMsg( $notice, array( 'cascadeprotectedwarning', count($cascadeSources) ) );
11601163 }
11611164 if( !$this->mTitle->exists() && $this->mTitle->getRestrictions( 'create' ) != array() ){
11621165 $wgOut->addWikiMsg( 'titleprotectedwarning' );
Index: trunk/phase3/languages/messages/MessagesEn.php
@@ -1150,8 +1150,7 @@
11511151 You may wish to cut-n-paste the text into a text file and save it for later.</strong>',
11521152 'protectedpagewarning' => '<strong>WARNING: This page has been locked so that only users with sysop privileges can edit it.</strong>',
11531153 '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}}:",
11561155 'titleprotectedwarning' => '<strong>WARNING: This page has been locked so that only some users can create it.</strong>',
11571156 'templatesused' => 'Templates used on this page:',
11581157 'templatesusedpreview' => 'Templates used in this preview:',

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r38879(bug 14002) Change cascade protection warning message to be consistent with c...werdna10:42, 8 August 2008

Status & tagging log