}
// Special pages ($title may have changed since if statement above)
- if ( NS_SPECIAL == $title->getNamespace() ) {
+ if ( $title->isSpecialPage() ) {
// Actions that need to be made when we have a special pages
SpecialPageFactory::executePath( $title, $this->context );
} else {
private function checkSpecialsAndNSPermissions( $action, $user, $errors, $rigor, $short ) {
# Only 'createaccount' can be performed on special pages,
# which don't actually exist in the DB.
- if ( NS_SPECIAL == $this->mNamespace && $action !== 'createaccount' ) {
+ if ( $this->isSpecialPage() && $action !== 'createaccount' ) {
$errors[] = [ 'ns-specialprotected' ];
}
$this->mTextform = strtr( $this->mDbkeyform, '_', ' ' );
# We already know that some pages won't be in the database!
- if ( $this->isExternal() || $this->mNamespace == NS_SPECIAL ) {
+ if ( $this->isExternal() || $this->isSpecialPage() ) {
$this->mArticleID = 0;
}
* @since 1.25
*/
public function addTrackingCategory( $msg, $title ) {
- if ( $title->getNamespace() === NS_SPECIAL ) {
+ if ( $title->isSpecialPage() ) {
wfDebug( __METHOD__ . ": Not adding tracking category $msg to special page!\n" );
return false;
}