From: Timo Tijhof Date: Mon, 24 Aug 2015 20:06:55 +0000 (+0200) Subject: objectcache: Remove use of deprecated $wgSessionsInMemcached X-Git-Tag: 1.31.0-rc.0~10293 X-Git-Url: http://git.cyclocoop.org/%24href?a=commitdiff_plain;h=86c701f290485ac94879fec0305eae65f621f147;p=lhc%2Fweb%2Fwiklou.git objectcache: Remove use of deprecated $wgSessionsInMemcached Deprecated since MediaWiki 1.20. Change-Id: I3b431714e0d2b21b3911c80bbf2b4b4868634510 --- diff --git a/includes/GlobalFunctions.php b/includes/GlobalFunctions.php index c3740a0146..035ff09061 100644 --- a/includes/GlobalFunctions.php +++ b/includes/GlobalFunctions.php @@ -3461,10 +3461,10 @@ function wfResetSessionID() { * @param bool $sessionId */ function wfSetupSession( $sessionId = false ) { - global $wgSessionsInMemcached, $wgSessionsInObjectCache, $wgSessionHandler; + global $wgSessionsInObjectCache, $wgSessionHandler; global $wgCookiePath, $wgCookieDomain, $wgCookieSecure, $wgCookieHttpOnly; - if ( $wgSessionsInObjectCache || $wgSessionsInMemcached ) { + if ( $wgSessionsInObjectCache ) { ObjectCacheSessionHandler::install(); } elseif ( $wgSessionHandler && $wgSessionHandler != ini_get( 'session.save_handler' ) ) { # Only set this if $wgSessionHandler isn't null and session.save_handler @@ -3485,7 +3485,7 @@ function wfSetupSession( $sessionId = false ) { session_start(); MediaWiki\restoreWarnings(); - if ( $wgSessionsInObjectCache || $wgSessionsInMemcached ) { + if ( $wgSessionsInObjectCache ) { ObjectCacheSessionHandler::renewCurrentSession(); } } diff --git a/includes/Setup.php b/includes/Setup.php index 0c1e99df8d..4d7428a2dd 100644 --- a/includes/Setup.php +++ b/includes/Setup.php @@ -477,6 +477,12 @@ if ( $wgMaximalPasswordLength !== false ) { $wgPasswordPolicy['policies']['default']['MaximalPasswordLength'] = $wgMaximalPasswordLength; } +// Backwards compatibility with deprecated alias +// Must be before call to wfSetupSession() +if ( $wgSessionsInMemcached ) { + $wgSessionsInObjectCache = true; +} + Profiler::instance()->scopedProfileOut( $ps_default ); // Disable MWDebug for command line mode, this prevents MWDebug from eating up