Merge "Slight improvements to FormSpecialPage behavior."
[lhc/web/wiklou.git] / includes / Setup.php
index 1ceee49..acbc3b6 100644 (file)
@@ -344,7 +344,14 @@ foreach ( $wgDisabledActions as $action ) {
        $wgActions[$action] = false;
 }
 
-if ( !$wgHtml5Version && $wgHtml5 && $wgAllowRdfaAttributes ) {
+# We always output html5 since 1.22, override any change made by local settings
+$wgHtml5 = true;
+
+# Setting wgXhtmlDefaultNamespace is not supported since 1.22.
+# However we define it here for extensions that depend on its value.
+$wgXhtmlDefaultNamespace = 'http://www.w3.org/1999/xhtml';
+
+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 +398,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;