r85124 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r85123‎ | r85124 | r85125 >
Date:14:50, 1 April 2011
Author:simetrical
Status:ok
Tags:
Comment:
Document what settings are disabled by $wgHtml5

Bug 28350.
Modified paths:
  • /trunk/phase3/includes/DefaultSettings.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/DefaultSettings.php
@@ -2148,28 +2148,49 @@
21492149 /** The default Content-Type header. */
21502150 $wgMimeType = 'text/html';
21512151
2152 -/** The content type used in script tags. */
 2152+/**
 2153+ * The content type used in script tags. This is mostly going to be ignored if
 2154+ * $wgHtml5 is true, at least for actual HTML output, since HTML5 doesn't
 2155+ * require a MIME type for JavaScript or CSS (those are the default script and
 2156+ * style languages).
 2157+ */
21532158 $wgJsMimeType = 'text/javascript';
21542159
2155 -/** The HTML document type. */
 2160+/**
 2161+ * The HTML document type. Ignored if $wgHtml5 is true, since <!DOCTYPE html>
 2162+ * doesn't actually have a doctype part to put this variable's contents in.
 2163+ */
21562164 $wgDocType = '-//W3C//DTD XHTML 1.0 Transitional//EN';
21572165
2158 -/** The URL of the document type declaration. */
 2166+/**
 2167+ * The URL of the document type declaration. Ignored if $wgHtml5 is true,
 2168+ * since HTML5 has no DTD, and <!DOCTYPE html> doesn't actually have a DTD part
 2169+ * to put this variable's contents in.
 2170+ */
21592171 $wgDTD = 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd';
21602172
2161 -/** The default xmlns attribute. */
 2173+/**
 2174+ * The default xmlns attribute. Ignored if $wgHtml5 is true (or it's supposed
 2175+ * to be), since we don't currently support XHTML5, and in HTML5 (i.e., served
 2176+ * as text/html) the attribute has no effect, so why bother?
 2177+ */
21622178 $wgXhtmlDefaultNamespace = 'http://www.w3.org/1999/xhtml';
21632179
21642180 /**
21652181 * Should we output an HTML5 doctype? If false, use XHTML 1.0 Transitional
21662182 * instead, and disable HTML5 features. This may eventually be removed and set
2167 - * to always true.
 2183+ * to always true. If it's true, a number of other settings will be irrelevant
 2184+ * and have no effect.
21682185 */
21692186 $wgHtml5 = true;
21702187
21712188 /**
21722189 * Defines the value of the version attribute in the &lt;html&gt; tag, if any.
2173 - * Will be initialized later if not set explicitly.
 2190+ * This is ignored if $wgHtml5 is false. If $wgAllowRdfaAttributes and
 2191+ * $wgHtml5 are both true, and this evaluates to boolean false (like if it's
 2192+ * left at the default null value), it will be auto-initialized to the correct
 2193+ * value for RDFa+HTML5. As such, you should have no reason to ever actually
 2194+ * set this to anything.
21742195 */
21752196 $wgHtml5Version = null;
21762197
@@ -2209,6 +2230,9 @@
22102231 * $wgXhtmlNamespaces['svg'] = 'http://www.w3.org/2000/svg';
22112232 * Normally we wouldn't have to define this in the root <html>
22122233 * element, but IE needs it there in some circumstances.
 2234+ *
 2235+ * This is ignored if $wgHtml5 is true, for the same reason as
 2236+ * $wgXhtmlDefaultNamespace.
22132237 */
22142238 $wgXhtmlNamespaces = array();
22152239

Status & tagging log