return MediaWikiServices::getInstance()->getNamespaceInfo()->getValidNamespaces();
}
- /**
- * Does this namespace ever have a talk namespace?
- *
- * @deprecated since 1.30, use hasTalkNamespace() instead.
- *
- * @param int $index Namespace index
- * @return bool True if this namespace either is or has a corresponding talk namespace.
- */
- public static function canTalk( $index ) {
- wfDeprecated( __METHOD__, '1.30' );
- return self::hasTalkNamespace( $index );
- }
-
/**
* Does this namespace ever have a talk namespace?
*
* @return array
*/
public static function getRestrictionLevels( $index, User $user = null ) {
- return MediaWikiServices::getInstance()->getNamespaceInfo()->
- getRestrictionLevels( $index, $user );
+ return MediaWikiServices::getInstance()
+ ->getPermissionManager()
+ ->getNamespaceRestrictionLevels( $index, $user );
}
/**