X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2FSetup.php;h=85ff3f32f663346262c697eeb67e9ba217ecdc98;hb=43f904b51a746d7f71ea2ab9951c5c98d269765b;hp=e962a4923e8c673bd128a02923c6cdade288a1e4;hpb=dfd80b414fbc1ebcbf4e0a662aca3706e3ed51c3;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/Setup.php b/includes/Setup.php index e962a4923e..85ff3f32f6 100644 --- a/includes/Setup.php +++ b/includes/Setup.php @@ -691,6 +691,11 @@ if ( !is_object( $wgAuth ) ) { // Set up the session $ps_session = Profiler::instance()->scopedProfileIn( $fname . '-session' ); +/** + * @var MediaWiki\\Session\\SessionId|null $wgInitialSessionId The persistent + * session ID (if any) loaded at startup + */ +$wgInitialSessionId = null; if ( !defined( 'MW_NO_SESSION' ) && !$wgCommandLineMode ) { // If session.auto_start is there, we can't touch session name if ( $wgPHPSessionHandling !== 'disable' && !wfIniGetBool( 'session.auto_start' ) ) { @@ -723,6 +728,10 @@ if ( !defined( 'MW_NO_SESSION' ) && !$wgCommandLineMode ) { throw $ex; } + if ( $session->isPersistent() ) { + $wgInitialSessionId = $session->getSessionId(); + } + $session->renew(); if ( MediaWiki\Session\PHPSessionHandler::isEnabled() && ( $session->isPersistent() || $session->shouldRememberUser() )