return SpecialPageFactory::resolveAlias( $alias );
}
- /**
- * Add a page to the list of valid special pages. This used to be the preferred
- * method for adding special pages in extensions. It's now suggested that you add
- * an associative record to $wgSpecialPages. This avoids autoloading SpecialPage.
- *
- * @param $page SpecialPage
- * @deprecated since 1.7, warnings in 1.17, might be removed in 1.20
- */
- static function addPage( &$page ) {
- wfDeprecated( __METHOD__, '1.7' );
- SpecialPageFactory::getList()->{$page->mName} = $page;
- }
-
/**
* Add a page to a certain display group for Special:SpecialPages
*
*
* @param $name String
* @param $subpage String|Bool subpage string, or false to not use a subpage
+ * @throws MWException
* @return Title object
*/
public static function getTitleFor( $name, $subpage = false ) {
*
* @param $fName String Name of called method
* @param $a Array Arguments to the method
+ * @throws MWException
* @deprecated since 1.17, call parent::__construct()
*/
public function __call( $fName, $a ) {
* pages?
*/
public function isRestricted() {
- global $wgGroupPermissions;
// DWIM: If all anons can do something, then it is not restricted
- return $this->mRestriction != '' && empty( $wgGroupPermissions['*'][$this->mRestriction] );
+ return $this->mRestriction != '' && User::groupHasPermission( '*', $this->mRestriction );
}
/**
* Called from execute() to check if the given user can perform this action.
* Failures here must throw subclasses of ErrorPageError.
* @param $user User
+ * @throws UserBlockedError
* @return Bool true
- * @throws ErrorPageError
*/
protected function checkExecutePermissions( User $user ) {
$this->checkPermissions();