Fixed wrong commit in rev. 5346
authorPatrick Broens <patrick@netcreators.com>
Thu, 23 Apr 2009 12:23:32 +0000 (12:23 +0000)
committerPatrick Broens <patrick@netcreators.com>
Thu, 23 Apr 2009 12:23:32 +0000 (12:23 +0000)
git-svn-id: https://svn.typo3.org/TYPO3v4/Core/trunk@5349 709f56b5-9817-0410-a4d7-c38de5d9e867

typo3/template.php

index 82a33d2..52b59d0 100644 (file)
 if (!defined('TYPO3_MODE'))    die("Can't include this file directly.");
 
 require_once(PATH_t3lib.'class.t3lib_ajax.php');
-require_once(PATH_t3lib.'class.t3lib_matchcondition.php');
+
 
 
 
@@ -650,25 +650,34 @@ class template {
 
                switch($this->docType)  {
                        case 'html_3':
-                               $headerStart = '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">';
+                               $headerStart = '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
+';
                                $htmlTag = '<html>';
                                break;
                        case 'xhtml_strict':
                                $headerStart = '<!DOCTYPE html
        PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
-       "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">';
+       "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<?xml version="1.0" encoding="'.$this->charset.'"?>
+<?xml-stylesheet href="#internalStyle" type="text/css"?>
+';
                                break;
                        case 'xhtml_frames':
                                $headerStart = '<!DOCTYPE html
      PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN"
-     "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">';
+     "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">
+<?xml version="1.0" encoding="'.$this->charset.'"?>
+';
                                break;
                        // The fallthrough is intended as XHTML 1.0 transitional is the default for the BE.
                        case 'xhtml_trans':
                        default:
                                $headerStart = '<!DOCTYPE html
      PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
-     "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">';
+     "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<?xml version="1.0" encoding="'.$this->charset.'"?>
+<?xml-stylesheet href="#internalStyle" type="text/css"?>
+';
                }
 
                // This loads the tabulator-in-textarea feature. It automatically modifies
@@ -677,33 +686,8 @@ class template {
                        $this->loadJavascriptLib('tab.js');
                }
 
-                       // Get the browser info
-               $matchObject = t3lib_div::makeInstance('t3lib_matchCondition');
-               $browserInfo = $matchObject->browserInfo(t3lib_div::getIndpEnv('HTTP_USER_AGENT'));
-
-                       // Set the XML prologue
-               $xmlPrologue = '<?xml version="1.0" encoding="' . $this->charset . '"?>';
-
-                       // Set the XML stylesheet
-               $xmlStylesheet = '<?xml-stylesheet href="#internalStyle" type="text/css"?>';
-
-                       // Add the XML prologue for XHTML doctypes
-               if ($this->docType !== 'html_3') {
-                               // Put the XML prologue before or after the doctype declaration according to browser
-                       if ($browserInfo['browser'] === 'msie' && $browserInfo['version'] < 7) {
-                               $headerStart = $headerStart . chr(10) . $xmlPrologue;
-                       } else {
-                               $headerStart = $xmlPrologue . chr(10) . $headerStart;
-                       }
-
-                               // Add the xml stylesheet according to doctype
-                       if ($this->docType !== 'xhtml_frames') {
-                               $headerStart = $headerStart . chr(10) . $xmlStylesheet;
-                       }
-               }
-
                        // Construct page header.
-               $str = $headerStart . chr(10) . $htmlTag . '
+               $str = $headerStart . $htmlTag . '
 <head>
        <!-- TYPO3 Script ID: '.htmlspecialchars($this->scriptID).' -->
        '.$charSet.'
@@ -1335,9 +1319,9 @@ $str.=$this->docBodyTagBegin().
         */
        protected function removeJavascriptLib($lib) {
                if (count($this->JScodeLibArray)) {
-                       $scripts = array_keys($this->JScodeLibArray);
+                       $scripts = array_keys($this->JScodeLibArray);   
                        foreach ($scripts as $script) {
-                               if (strpos($script, '/' . $lib . '/') !== false) {
+                               if (strpos($script, '/' . $lib . '/') !== false) {   
                                        unset ($this->JScodeLibArray[$script]);
                                }
                        }
@@ -2014,7 +1998,7 @@ $str.=$this->docBodyTagBegin().
                        }
                                // resolve dependencies
                        if (in_array('dragdrop', $mods) || in_array('controls', $mods)) {
-                               $mods = array_merge(array('effects'), $mods);
+                               $mods = array_merge(array('effects'), $mods);                   
                        }
 
                        if (count($mods)) {
@@ -2122,7 +2106,7 @@ $str.=$this->docBodyTagBegin().
                $this->addExtJSdebug = true;
        }
 
-
+       
 }