Fixed bug #17001: Rename config.doctype value "html_5" to "html5" (Thanks to Sebastia...
authorSteffen Gebert <steffen.gebert@typo3.org>
Fri, 14 Jan 2011 22:47:45 +0000 (22:47 +0000)
committerSteffen Gebert <steffen.gebert@typo3.org>
Fri, 14 Jan 2011 22:47:45 +0000 (22:47 +0000)
git-svn-id: https://svn.typo3.org/TYPO3v4/Core/trunk@10081 709f56b5-9817-0410-a4d7-c38de5d9e867

ChangeLog
typo3/sysext/cms/tslib/class.tslib_menu.php
typo3/sysext/cms/tslib/class.tslib_pagegen.php
typo3/sysext/t3editor/res/tsref/tsref.xml
typo3/template.php

index a647ba2..a267f29 100755 (executable)
--- a/ChangeLog
+++ b/ChangeLog
@@ -11,6 +11,7 @@
 2011-01-14  Steffen Gebert  <steffen@steffen-gebert.de>
 
        * Fixed bug #16996: CSH tooltip shows for too long time (Thanks to Christian Mueller)
+       * Fixed bug #17001: Rename config.doctype value "html_5" to "html5" (Thanks to Sebastian Michaelsen)
 
 2011-01-14  Christian Kuhn  <lolli@schwarzbu.ch>
 
index f7c4aab..f1cfdb2 100644 (file)
@@ -221,7 +221,7 @@ class tslib_menu {
                        case 'xhtml_strict':
                        case 'xhtml_11':
                        case 'xhtml_2':
-            case 'html_5':
+            case 'html5':
                                $this->nameAttribute = 'id';
                                break;
                        default:
index 7b3fa43..60a540e 100644 (file)
@@ -211,6 +211,11 @@ See <a href="http://wiki.typo3.org/index.php/TYPO3_3.8.1" target="_blank">wiki.t
                        $GLOBALS['TSFE']->linkVars='';
                }
 
+               if($GLOBALS['TSFE']->config['config']['doctype'] == 'html_5') {
+                       $GLOBALS['TSFE']->logDeprecatedTyposcript('config.doctype = html_5', 'It will be removed in TYPO3 4.7. Use html5 instead.');
+                       $GLOBALS['TSFE']->config['config']['doctype'] = 'html5';
+               }
+               
                        // Setting XHTML-doctype from doctype
                if (!$GLOBALS['TSFE']->config['config']['xhtmlDoctype'])        {
                        $GLOBALS['TSFE']->config['config']['xhtmlDoctype'] = $GLOBALS['TSFE']->config['config']['doctype'];
@@ -427,7 +432,7 @@ See <a href="http://wiki.typo3.org/index.php/TYPO3_3.8.1" target="_blank">wiki.t
        PUBLIC "-//W3C//DTD XHTML+RDFa 1.0//EN"
        "http://www.w3.org/MarkUp/DTD/xhtml-rdfa-1.dtd">';
                                        break;
-                               case 'html_5' :
+                               case 'html5' :
                                        $docTypeParts[] = '<!DOCTYPE html>';
                                        break;
                                case 'none' :
@@ -443,10 +448,10 @@ See <a href="http://wiki.typo3.org/index.php/TYPO3_3.8.1" target="_blank">wiki.t
                if ($GLOBALS['TSFE']->xhtmlVersion) {
                        $htmlTagAttributes['xml:lang'] = $htmlLang;
                }
-               if ($GLOBALS['TSFE']->xhtmlVersion < 110 || $doctype === 'html_5') {
+               if ($GLOBALS['TSFE']->xhtmlVersion < 110 || $doctype === 'html5') {
                        $htmlTagAttributes['lang'] = $htmlLang;
                }
-               if ($GLOBALS['TSFE']->xhtmlVersion || $doctype === 'html_5') {
+               if ($GLOBALS['TSFE']->xhtmlVersion || $doctype === 'html5') {
                        $htmlTagAttributes['xmlns'] = 'http://www.w3.org/1999/xhtml'; // We add this to HTML5 to achieve a slightly better backwards compatibility
                        if (is_array($GLOBALS['TSFE']->config['config']['namespaces.'])) {
                                foreach ($GLOBALS['TSFE']->config['config']['namespaces.'] as $prefix => $uri) {
index c90b902..c2a9594 100644 (file)
@@ -458,7 +458,7 @@ Use this feature in templates supplying other content-types than HTML. That coul
 "xhtml_11" for XHTML 1.1 doctype.
 "xhtml+rdf_10" for XHTML+RDFa 1.0 doctype.
 "xhtml_2" for XHTML 2 doctype.
-"html_5" for HTML5
+"html5" for HTML5
 "none" for NO doctype at all.
 
 Note that the keywords also change the way TYPO3 generates some of the XHTML tags to ensure valid XML. If you set doctype to a string, then you must also set config.xhtmlDoctype (see below).
index 4155373..e6d4727 100644 (file)
@@ -759,7 +759,7 @@ class template {
      PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
      "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">';
                                // The fallthrough is intended as HTML5, as this is the default for the BE since TYPO3 4.5
-                       case 'html_5':
+                       case 'html5':
                        default:
                                $headerStart = '<!DOCTYPE html>' . LF;
                                $htmlTag = '<html>';