Fix outdated comment in DefaultSettings
[lhc/web/wiklou.git] / includes / EditPage.php
index c0e7ed2..f86cae4 100644 (file)
@@ -2476,7 +2476,9 @@ class EditPage {
                        }
                }
 
-               if ( $this->mTitle->getNamespace() != NS_MEDIAWIKI && $this->mTitle->isProtected( 'edit' ) ) {
+               if ( $this->mTitle->isProtected( 'edit' ) &&
+                       MWNamespace::getRestrictionLevels( $this->mTitle->getNamespace() ) !== array( '' )
+               ) {
                        # Is the title semi-protected?
                        if ( $this->mTitle->isSemiProtected() ) {
                                $noticeMsg = 'semiprotectedpagewarning';
@@ -2678,7 +2680,9 @@ HTML
                        $attribs = array( 'style' => 'display:none;' );
                } else {
                        $classes = array(); // Textarea CSS
-                       if ( $this->mTitle->getNamespace() != NS_MEDIAWIKI && $this->mTitle->isProtected( 'edit' ) ) {
+                       if ( $this->mTitle->isProtected( 'edit' ) &&
+                               MWNamespace::getRestrictionLevels( $this->mTitle->getNamespace() ) !== array( '' )
+                       ) {
                                # Is the title semi-protected?
                                if ( $this->mTitle->isSemiProtected() ) {
                                        $classes[] = 'mw-textarea-sprotected';