- $domain = DatabaseDomain::newFromId( $domain );
- $curDomain = self::getCurrentWikiDbDomain();
-
- if ( !in_array( $curDomain->getSchema(), [ null, 'mediawiki' ], true ) ) {
- // Include the schema if it is set and is not the default placeholder.
- // This means a site admin may have specifically taylored the schemas.
- // Domain IDs might use the form <DB>-<project>-<language>, meaning that
- // the schema portion must be accounted for to disambiguate wikis.
- return $curDomain->equals( $domain );
- }
-
- return (
- $curDomain->getDatabase() === $domain->getDatabase() &&
- $curDomain->getTablePrefix() === $domain->getTablePrefix()
- );