$wgDebugLogFile = '';
}
-// Disable AuthManager API modules if $wgDisableAuthManager
-if ( $wgDisableAuthManager ) {
- $wgAPIModules += [
- 'clientlogin' => 'ApiDisabled',
- 'createaccount' => 'ApiCreateAccount', // Use the non-AuthManager version
- 'linkaccount' => 'ApiDisabled',
- 'unlinkaccount' => 'ApiDisabled',
- 'changeauthenticationdata' => 'ApiDisabled',
- 'removeauthenticationdata' => 'ApiDisabled',
- 'resetpassword' => 'ApiDisabled',
- ];
- $wgAPIMetaModules += [
- 'authmanagerinfo' => 'ApiQueryDisabled',
- ];
-}
-
// Backwards compatibility with old password limits
if ( $wgMinimalPasswordLength !== false ) {
$wgPasswordPolicy['policies']['default']['MinimalPasswordLength'] = $wgMinimalPasswordLength;
// Reset the global service locator, so any services that have already been created will be
// re-created while taking into account any custom settings and extensions.
MediaWikiServices::resetGlobalInstance( new GlobalVarConfig(), 'quick' );
+// Apply $wgSharedDB table aliases for the local LB (all non-foreign DB connections)
+if ( $wgSharedDB && $wgSharedTables ) {
+ MediaWikiServices::getInstance()->getDBLoadBalancer()->setTableAliases(
+ array_fill_keys(
+ $wgSharedTables,
+ [
+ 'dbname' => $wgSharedDB,
+ 'schema' => $wgSharedSchema,
+ 'prefix' => $wgSharedPrefix
+ ]
+ )
+ );
+}
// Define a constant that indicates that the bootstrapping of the service locator
// is complete.
if ( is_null( $wgLocalTZoffset ) ) {
$wgLocalTZoffset = date( 'Z' ) / 60;
}
+// The part after the System| is ignored, but rest of MW fills it
+// out as the local offset.
+$wgDefaultUserOptions['timecorrection'] = "System|$wgLocalTZoffset";
if ( !$wgDBerrorLogTZ ) {
$wgDBerrorLogTZ = $wgLocaltimezone;
wfDebugLog( 'caches',
'cluster: ' . get_class( $wgMemc ) .
- ', WAN: ' . $wgMainWANCache .
+ ', WAN: ' . ( $wgMainWANCache === CACHE_NONE ? 'CACHE_NONE' : $wgMainWANCache ) .
', stash: ' . $wgMainStash .
', message: ' . get_class( $messageMemc ) .
', parser: ' . get_class( $parserMemc ) .
$wgRequest->interpolateTitle();
if ( !is_object( $wgAuth ) ) {
- $wgAuth = $wgDisableAuthManager ? new AuthPlugin : new MediaWiki\Auth\AuthManagerAuthPlugin;
+ $wgAuth = new MediaWiki\Auth\AuthManagerAuthPlugin;
Hooks::run( 'AuthPluginSetup', [ &$wgAuth ] );
}
-if ( !$wgDisableAuthManager &&
- $wgAuth && !$wgAuth instanceof MediaWiki\Auth\AuthManagerAuthPlugin
-) {
+if ( $wgAuth && !$wgAuth instanceof MediaWiki\Auth\AuthManagerAuthPlugin ) {
MediaWiki\Auth\AuthManager::singleton()->forcePrimaryAuthenticationProviders( [
new MediaWiki\Auth\TemporaryPasswordPrimaryAuthenticationProvider( [
'authoritative' => false,
$sessionUser = MediaWiki\Session\SessionManager::getGlobalSession()->getUser();
if ( $sessionUser->getId() === 0 && User::isValidUserName( $sessionUser->getName() ) ) {
$ps_autocreate = Profiler::instance()->scopedProfileIn( $fname . '-autocreate' );
- if ( $wgDisableAuthManager ) {
- $res = MediaWiki\Session\SessionManager::autoCreateUser( $sessionUser );
- } else {
- $res = MediaWiki\Auth\AuthManager::singleton()->autoCreateUser(
- $sessionUser,
- MediaWiki\Auth\AuthManager::AUTOCREATE_SOURCE_SESSION,
- true
- );
- }
+ $res = MediaWiki\Auth\AuthManager::singleton()->autoCreateUser(
+ $sessionUser,
+ MediaWiki\Auth\AuthManager::AUTOCREATE_SOURCE_SESSION,
+ true
+ );
Profiler::instance()->scopedProfileOut( $ps_autocreate );
- \MediaWiki\Logger\LoggerFactory::getInstance( 'authmanager' )->info( 'Autocreation attempt', [
+ \MediaWiki\Logger\LoggerFactory::getInstance( 'authevents' )->info( 'Autocreation attempt', [
'event' => 'autocreate',
'status' => $res,
] );