X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2FSetup.php;h=9bf05e087f282af9b8eac79d64f90033a7792f4b;hb=03328b0d1c2a7194dbfdc65a73e246032e7ab653;hp=e962a4923e8c673bd128a02923c6cdade288a1e4;hpb=23164604db9727b44d6d420b3344636da4934be1;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/Setup.php b/includes/Setup.php index e962a4923e..9bf05e087f 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,12 +728,17 @@ 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() ) ) { // Start the PHP-session for backwards compatibility session_id( $session->getId() ); + MediaWiki\quietCall( 'session_cache_limiter', 'private, must-revalidate' ); MediaWiki\quietCall( 'session_start' ); } }