Florianschmidtwelzow has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/264097

Change subject: Use MediaWiki\Session\SessionManager instead of deprecated 
session handling functions
......................................................................

Use MediaWiki\Session\SessionManager instead of deprecated session handling 
functions

session_id() is replaced by ->isPersistent(), and wfSetupSession() by
->persist().

Change-Id: I2ab7cde69043b718ca7ec7ca52412c01310014eb
---
M includes/specials/SpecialGoogleLogin.php
1 file changed, 3 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/GoogleLogin 
refs/changes/97/264097/1

diff --git a/includes/specials/SpecialGoogleLogin.php 
b/includes/specials/SpecialGoogleLogin.php
index 3e12137..66c24f1 100644
--- a/includes/specials/SpecialGoogleLogin.php
+++ b/includes/specials/SpecialGoogleLogin.php
@@ -35,8 +35,9 @@
 
                // it's possible, that the session isn't started yet (if 
GoogleLogin
                // replaces MediaWiki login, e.g.)
-               if ( session_id() == '' ) {
-                       wfSetupSession();
+               $session = MediaWiki\Session\SessionManager::getGlobalSession();
+               if ( $session->isPersistent() == '' ) {
+                       $session->persist();
                }
 
                $this->redirectFromLoginForm( $request, $client );

-- 
To view, visit https://gerrit.wikimedia.org/r/264097
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I2ab7cde69043b718ca7ec7ca52412c01310014eb
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/GoogleLogin
Gerrit-Branch: master
Gerrit-Owner: Florianschmidtwelzow <florian.schmidt.stargatewis...@gmail.com>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to