X-Git-Url: https://git.heureux-cyclage.org/?p=lhc%2Fweb%2Fwiklou.git;a=blobdiff_plain;f=includes%2FSetup.php;h=7b7cafcddb695d7287ec90046d42c2fec0aa5692;hp=c9fe8d0fe812b389a0c9f7f8d7d619e00e417302;hb=632c3b6a171bb39e167fe4b43f86f42e0933abc2;hpb=92571d7c1a9c25604382f9c395e487e44cc442d5 diff --git a/includes/Setup.php b/includes/Setup.php index c9fe8d0fe8..7b7cafcddb 100644 --- a/includes/Setup.php +++ b/includes/Setup.php @@ -280,7 +280,6 @@ if ( !$wgLocalFileRepo ) { 'name' => 'local', 'directory' => $wgUploadDirectory, 'scriptDirUrl' => $wgScriptPath, - 'scriptExtension' => '.php', 'url' => $wgUploadBaseUrl ? $wgUploadBaseUrl . $wgUploadPath : $wgUploadPath, 'hashLevels' => $wgHashedUploadDirectory ? 2 : 0, 'thumbScriptUrl' => $wgThumbnailScriptPath, @@ -528,9 +527,9 @@ $wgJsMimeType = 'text/javascript'; $wgFileExtensions = array_values( array_diff( $wgFileExtensions, $wgFileBlacklist ) ); if ( $wgInvalidateCacheOnLocalSettingsChange ) { - MediaWiki\suppressWarnings(); + Wikimedia\suppressWarnings(); $wgCacheEpoch = max( $wgCacheEpoch, gmdate( 'YmdHis', filemtime( "$IP/LocalSettings.php" ) ) ); - MediaWiki\restoreWarnings(); + Wikimedia\restoreWarnings(); } if ( $wgNewUserLog ) { @@ -717,9 +716,9 @@ wfMemoryLimit(); * explicitly set. Inspired by phpMyAdmin's treatment of the problem. */ if ( is_null( $wgLocaltimezone ) ) { - MediaWiki\suppressWarnings(); + Wikimedia\suppressWarnings(); $wgLocaltimezone = date_default_timezone_get(); - MediaWiki\restoreWarnings(); + Wikimedia\restoreWarnings(); } date_default_timezone_set( $wgLocaltimezone ); @@ -870,11 +869,19 @@ if ( !defined( 'MW_NO_SESSION' ) && !$wgCommandLineMode ) { $session->renew(); if ( MediaWiki\Session\PHPSessionHandler::isEnabled() && - ( $session->isPersistent() || $session->shouldRememberUser() ) + ( $session->isPersistent() || $session->shouldRememberUser() ) && + session_id() !== $session->getId() ) { // Start the PHP-session for backwards compatibility + if ( session_id() !== '' ) { + wfDebugLog( 'session', 'PHP session {old_id} was already started, changing to {new_id}', 'all', [ + 'old_id' => session_id(), + 'new_id' => $session->getId(), + ] ); + session_write_close(); + } session_id( $session->getId() ); - MediaWiki\quietCall( 'session_start' ); + session_start(); } unset( $session );