Drop support for XHTML 1.0
[lhc/web/wiklou.git] / includes / OutputPage.php
index 3abfff0..d379e46 100644 (file)
@@ -1296,7 +1296,6 @@ class OutputPage extends ContextSource {
         * Return whether user JavaScript is allowed for this page
         * @deprecated since 1.18 Load modules with ResourceLoader, and origin and
         *     trustworthiness is identified and enforced automagically.
-        *     Will be removed in 1.20.
         * @return Boolean
         */
        public function isUserJsAllowed() {
@@ -2076,7 +2075,7 @@ class OutputPage extends ContextSource {
        }
 
        /**
-        * Actually output something with print().
+        * Actually output something with print.
         *
         * @param string $ins the string to output
         */
@@ -2968,7 +2967,7 @@ $templates
                // This also enforces $.isReady to be true at </body> which fixes the
                // mw.loader bug in Firefox with using document.write between </body>
                // and the DOMContentReady event (bug 47457).
-               $html = Html::inlineScript( 'jQuery.ready();' );
+               $html = Html::inlineScript( 'window.jQuery && jQuery.ready();' );
 
                if ( !$wgResourceLoaderExperimentalAsyncLoading ) {
                        $html .= $this->getScriptsForBottomQueue( false );
@@ -3062,6 +3061,7 @@ $templates
                        'wgCategories' => $this->getCategories(),
                        'wgBreakFrames' => $this->getFrameOptions() == 'DENY',
                        'wgPageContentLanguage' => $lang->getCode(),
+                       'wgPageContentModel' => $title->getContentModel(),
                        'wgSeparatorTransformTable' => $compactSeparatorTransTable,
                        'wgDigitTransformTable' => $compactDigitTransTable,
                        'wgDefaultDateFormat' => $lang->getDefaultDateFormat(),
@@ -3074,6 +3074,10 @@ $templates
                        $vars['wgUserEditCount'] = $user->getEditCount();
                        $userReg = wfTimestampOrNull( TS_UNIX, $user->getRegistration() );
                        $vars['wgUserRegistration'] = $userReg !== null ? ( $userReg * 1000 ) : null;
+                       // Get the revision ID of the oldest new message on the user's talk
+                       // page. This can be used for constructing new message alerts on
+                       // the client side.
+                       $vars['wgUserNewMsgRevisionId'] = $user->getNewMessageRevisionId();
                }
                if ( $wgContLang->hasVariants() ) {
                        $vars['wgUserVariant'] = $wgContLang->getPreferredVariant();
@@ -3129,7 +3133,7 @@ $templates
         */
        public function getHeadLinksArray( $addContentType = false ) {
                global $wgUniversalEditButton, $wgFavicon, $wgAppleTouchIcon, $wgEnableAPI,
-                       $wgSitename, $wgVersion, $wgHtml5, $wgMimeType,
+                       $wgSitename, $wgVersion,
                        $wgFeed, $wgOverrideSiteFeed, $wgAdvertisedFeedTypes,
                        $wgDisableLangConversion, $wgCanonicalLanguageLinks,
                        $wgRightsPage, $wgRightsUrl;
@@ -3139,20 +3143,9 @@ $templates
                $canonicalUrl = $this->mCanonicalUrl;
 
                if ( $addContentType ) {
-                       if ( $wgHtml5 ) {
-                               # More succinct than <meta http-equiv=Content-Type>, has the
-                               # same effect
-                               $tags['meta-charset'] = Html::element( 'meta', array( 'charset' => 'UTF-8' ) );
-                       } else {
-                               $tags['meta-content-type'] = Html::element( 'meta', array(
-                                       'http-equiv' => 'Content-Type',
-                                       'content' => "$wgMimeType; charset=UTF-8"
-                               ) );
-                               $tags['meta-content-style-type'] = Html::element( 'meta', array( // bug 15835
-                                       'http-equiv' => 'Content-Style-Type',
-                                       'content' => 'text/css'
-                               ) );
-                       }
+                       # More succinct than <meta http-equiv=Content-Type>, has the
+                       # same effect
+                       $tags['meta-charset'] = Html::element( 'meta', array( 'charset' => 'UTF-8' ) );
                }
 
                $tags['meta-generator'] = Html::element( 'meta', array(