X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2FSetup.php;h=d8c9180685546c260fa69817998322abf0ba62c8;hb=beb1c4a0eced04ce2098433c383f1fbe469569c9;hp=1ceee498eb4f58c7982eed39e50a3aee66fb1133;hpb=aba48f4ef94fb85b571a25cb9fb49a9a62dc3f44;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/Setup.php b/includes/Setup.php index 1ceee498eb..d8c9180685 100644 --- a/includes/Setup.php +++ b/includes/Setup.php @@ -344,7 +344,13 @@ foreach ( $wgDisabledActions as $action ) { $wgActions[$action] = false; } -if ( !$wgHtml5Version && $wgHtml5 && $wgAllowRdfaAttributes ) { +# We always output HTML5 since 1.22, overriding these is no longer supported +# we set them here for extensions that depend on its value. +$wgHtml5 = true; +$wgXhtmlDefaultNamespace = 'http://www.w3.org/1999/xhtml'; +$wgJsMimeType = 'text/javascript'; + +if ( !$wgHtml5Version && $wgAllowRdfaAttributes ) { # see http://www.w3.org/TR/rdfa-in-html/#document-conformance if ( $wgMimeType == 'application/xhtml+xml' ) { $wgHtml5Version = 'XHTML+RDFa 1.0'; @@ -391,22 +397,20 @@ if ( $wgDebugToolbar && !$wgCommandLineMode ) { MWDebug::init(); } -if ( !defined( 'MW_COMPILED' ) ) { - if ( !MWInit::classExists( 'AutoLoader' ) ) { - require_once( "$IP/includes/AutoLoader.php" ); - } +if ( !class_exists( 'AutoLoader' ) ) { + require_once "$IP/includes/AutoLoader.php"; +} - wfProfileIn( $fname . '-exception' ); - MWExceptionHandler::installHandler(); - wfProfileOut( $fname . '-exception' ); +wfProfileIn( $fname . '-exception' ); +MWExceptionHandler::installHandler(); +wfProfileOut( $fname . '-exception' ); - wfProfileIn( $fname . '-includes' ); - require_once( "$IP/includes/normal/UtfNormalUtil.php" ); - require_once( "$IP/includes/GlobalFunctions.php" ); - require_once( "$IP/includes/ProxyTools.php" ); - require_once( "$IP/includes/normal/UtfNormalDefines.php" ); - wfProfileOut( $fname . '-includes' ); -} +wfProfileIn( $fname . '-includes' ); +require_once "$IP/includes/normal/UtfNormalUtil.php"; +require_once "$IP/includes/GlobalFunctions.php"; +require_once "$IP/includes/ProxyTools.php"; +require_once "$IP/includes/normal/UtfNormalDefines.php"; +wfProfileOut( $fname . '-includes' ); if ( $wgSecureLogin && substr( $wgServer, 0, 2 ) !== '//' ) { $wgSecureLogin = false;