From 2c6fdc80510eab249064763fafe57fa5decdf509 Mon Sep 17 00:00:00 2001 From: Alexandre Emsenhuber Date: Sat, 5 Mar 2011 19:49:24 +0000 Subject: [PATCH] * NS_SPECIAL should not have any applicable restriction type * Removed some trailing whitespaces --- includes/Title.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/includes/Title.php b/includes/Title.php index be0dbd19fd..59a0803a68 100644 --- a/includes/Title.php +++ b/includes/Title.php @@ -4136,6 +4136,10 @@ class Title { * @return array applicable restriction types */ public function getRestrictionTypes() { + if ( $this->getNamespace() == NS_SPECIAL ) { + return array(); + } + $types = self::getFilteredRestrictionTypes( $this->exists() ); if ( $this->getNamespace() != NS_FILE ) { @@ -4162,7 +4166,7 @@ class Title { $types = $wgRestrictionTypes; if ( $exists ) { # Remove the create restriction for existing titles - $types = array_diff( $types, array( 'create' ) ); + $types = array_diff( $types, array( 'create' ) ); } else { # Only the create and upload restrictions apply to non-existing titles $types = array_intersect( $types, array( 'create', 'upload' ) ); -- 2.20.1