X-Git-Url: https://git.heureux-cyclage.org/?p=lhc%2Fweb%2Fwiklou.git;a=blobdiff_plain;f=includes%2FSetup.php;h=d450bdd33cebbd8df473cea732a33797e735924a;hp=39f0c8116f6d5accc21ba434a1a0996144a9f71b;hb=af80076034fb734d652eb043c523c1d8df974e51;hpb=339a7c13003d8fcd8ccafd55559fc19cdaef3f11 diff --git a/includes/Setup.php b/includes/Setup.php index 39f0c8116f..d450bdd33c 100644 --- a/includes/Setup.php +++ b/includes/Setup.php @@ -440,6 +440,13 @@ if ( $wgEnableEmail ) { $wgUsersNotifiedOnAllChanges = []; } +// $wgSysopEmailBans deprecated in 1.34 +if ( isset( $wgSysopEmailBans ) && $wgSysopEmailBans === false ) { + foreach ( $wgGroupPermissions as $group => $_ ) { + unset( $wgGroupPermissions[$group]['blockemail'] ); + } +} + if ( $wgMetaNamespace === false ) { $wgMetaNamespace = str_replace( ' ', '_', $wgSitename ); } @@ -721,7 +728,7 @@ if ( is_null( $wgLocaltimezone ) ) { date_default_timezone_set( $wgLocaltimezone ); if ( is_null( $wgLocalTZoffset ) ) { - $wgLocalTZoffset = date( 'Z' ) / 60; + $wgLocalTZoffset = (int)date( 'Z' ) / 60; } // The part after the System| is ignored, but rest of MW fills it // out as the local offset. @@ -808,22 +815,17 @@ if ( !defined( 'MW_NO_SESSION' ) && !$wgCommandLineMode ) { // Initialize the session try { $session = MediaWiki\Session\SessionManager::getGlobalSession(); - } catch ( OverflowException $ex ) { - if ( isset( $ex->sessionInfos ) && count( $ex->sessionInfos ) >= 2 ) { - // The exception is because the request had multiple possible - // sessions tied for top priority. Report this to the user. - $list = []; - foreach ( $ex->sessionInfos as $info ) { - $list[] = $info->getProvider()->describe( $wgContLang ); - } - $list = $wgContLang->listToText( $list ); - throw new HttpError( 400, - Message::newFromKey( 'sessionmanager-tie', $list )->inLanguage( $wgContLang )->plain() - ); + } catch ( MediaWiki\Session\SessionOverflowException $ex ) { + // The exception is because the request had multiple possible + // sessions tied for top priority. Report this to the user. + $list = []; + foreach ( $ex->getSessionInfos() as $info ) { + $list[] = $info->getProvider()->describe( $wgContLang ); } - - // Not the one we want, rethrow - throw $ex; + $list = $wgContLang->listToText( $list ); + throw new HttpError( 400, + Message::newFromKey( 'sessionmanager-tie', $list )->inLanguage( $wgContLang )->plain() + ); } if ( $session->isPersistent() ) {