if ( !$t ) {
$this->dieUsageMsg( array( 'invalidtitle', $titlePart ) );
}
- if ( $defaultNamespace != $t->getNamespace() || $t->getInterwiki() !== '' ) {
+ if ( $defaultNamespace != $t->getNamespace() || $t->isExternal() ) {
// This can happen in two cases. First, if you call titlePartToKey with a title part
// that looks like a namespace, but with $defaultNamespace = NS_MAIN. It would be very
// difficult to handle such a case. Such cases cannot exist and are therefore treated
return $errors;
}
+
+ /**
+ * Check whether the current user has permission to view revision-deleted
+ * fields.
+ * @return bool
+ */
+ public function userCanSeeRevDel() {
+ return $this->getUser()->isAllowedAny( 'deletedhistory', 'deletedtext', 'suppressrevision' );
+ }
}
/**