* @file
*/
+use Wikimedia\Rdbms\Database;
use Wikimedia\Rdbms\IDatabase;
use MediaWiki\Linker\LinkTarget;
use MediaWiki\Interwiki\InterwikiLookup;
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;
}
}
/**
- * Whether the magic words __INDEX__ and __NOINDEX__ function for this page.
+ * Whether the magic words __INDEX__ and __NOINDEX__ function for this page.
*
* @return bool
*/