$wgUsersNotifiedOnAllChanges = [];
}
+// $wgSysopEmailBans deprecated in 1.34
+if ( isset( $wgSysopEmailBans ) && $wgSysopEmailBans === false ) {
+ wfDeprecated( 'wgSysopEmailBans', '1.34' );
+ foreach ( $wgGroupPermissions as $group => $_ ) {
+ unset( $wgGroupPermissions[$group]['blockemail'] );
+ }
+}
+
if ( $wgMetaNamespace === false ) {
$wgMetaNamespace = str_replace( ' ', '_', $wgSitename );
}
MWExceptionHandler::installHandler();
+// T30798: $wgServer must be explicitly set
+if ( $wgServer === false ) {
+ throw new FatalError(
+ '$wgServer must be set in LocalSettings.php. ' .
+ 'See <a href="https://www.mediawiki.org/wiki/Manual:$wgServer">' .
+ 'https://www.mediawiki.org/wiki/Manual:$wgServer</a>.'
+ );
+}
+
// T48998: Bail out early if $wgArticlePath is non-absolute
foreach ( [ 'wgArticlePath', 'wgVariantArticlePath' ] as $varName ) {
if ( $$varName && !preg_match( '/^(https?:\/\/|\/)/', $$varName ) ) {
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.
// 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() ) {