objectcache: Remove use of deprecated $wgSessionsInMemcached
authorTimo Tijhof <krinklemail@gmail.com>
Mon, 24 Aug 2015 20:06:55 +0000 (22:06 +0200)
committerTimo Tijhof <krinklemail@gmail.com>
Mon, 24 Aug 2015 20:11:22 +0000 (22:11 +0200)
Deprecated since MediaWiki 1.20.

Change-Id: I3b431714e0d2b21b3911c80bbf2b4b4868634510

includes/GlobalFunctions.php
includes/Setup.php

index c3740a0..035ff09 100644 (file)
@@ -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();
        }
 }
index 0c1e99d..4d7428a 100644 (file)
@@ -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