From: Aaron Schulz Date: Fri, 23 Mar 2007 19:20:53 +0000 (+0000) Subject: *If a page is protected and cascade protected, use regular edit page notice (bug... X-Git-Tag: 1.31.0-rc.0~53625 X-Git-Url: https://git.cyclocoop.org/%242?a=commitdiff_plain;h=ced0c56c9376c1f9de53361cdea9a404af359fd5;p=lhc%2Fweb%2Fwiklou.git *If a page is protected and cascade protected, use regular edit page notice (bug 9401) --- diff --git a/includes/EditPage.php b/includes/EditPage.php index 2eabfdaf54..94f74999de 100644 --- a/includes/EditPage.php +++ b/includes/EditPage.php @@ -994,14 +994,14 @@ class EditPage { } else { # It's either cascading protection or regular protection; work out which list($cascadeSources, $restrictions) = $this->mTitle->getCascadeProtectionSources(); - if( $cascadeSources && count( $cascadeSources ) > 0 ) { + if { !$cascadeSources || count( $cascadeSources ) == 0 ) { + # Regular protection + $notice = wfMsg( 'protectedpagewarning' ); + } else { # Cascading protection; explain, and list the titles responsible $notice = wfMsg( 'cascadeprotectedwarning' ) . "\n"; foreach( $cascadeSources as $source ) $notice .= '* [[:' . $source->getPrefixedText() . "]]\n"; - } else { - # Regular protection - $notice = wfMsg( 'protectedpagewarning' ); } } $wgOut->addWikiText( $notice );