Fixed bug #12017: Wrong Inclusion in tceforms and tceforms_fe
authorSteffen Kamper <info@sk-typo3.de>
Sun, 20 Sep 2009 19:00:04 +0000 (19:00 +0000)
committerSteffen Kamper <info@sk-typo3.de>
Sun, 20 Sep 2009 19:00:04 +0000 (19:00 +0000)
git-svn-id: https://svn.typo3.org/TYPO3v4/Core/trunk@6021 709f56b5-9817-0410-a4d7-c38de5d9e867

ChangeLog
t3lib/class.t3lib_tceforms.php
t3lib/class.t3lib_tceforms_fe.php

index 9b2e28a..26c75f6 100755 (executable)
--- a/ChangeLog
+++ b/ChangeLog
@@ -22,6 +22,7 @@
 
 2009-09-20  Steffen Kamper  <info@sk-typo3.de>
 
+       * Fixed bug #12017: Wrong Inclusion in tceforms and tceforms_fe
        * Fixed bug #12016: JS and CSS inclusion may contain path/../path2/file
        * Fixed bug #11933: FrontendEditing (classic) does not work when editing forms on page
 
index 12e7974..60b5c26 100644 (file)
@@ -5263,9 +5263,7 @@ class t3lib_TCEforms      {
                        $pageRenderer->addInlineSettingArray('', $resizableSettings);
 
                        $this->loadJavascriptLib('../t3lib/jsfunc.evalfield.js');
-
-                       // @TODO: Change to loadJavascriptLib(), but fix "TS = new typoScript()" issue first - see bug #9494
-                       $jsFile[] = '<script type="text/javascript" src="'.$this->backPath.'jsfunc.tbe_editor.js"></script>';
+                       $this->loadJavascriptLib('jsfunc.tbe_editor.js');
 
                                // needed for tceform manipulation (date picker)
                        $typo3Settings = array(
index 89d0b39..8c853d7 100644 (file)
@@ -136,9 +136,10 @@ class t3lib_TCEforms_FE extends t3lib_TCEforms {
         * @return      void
         */
        public function loadJavascriptLib($lib) {
-               if (!isset($GLOBALS['TSFE']->additionalHeaderData[$lib])) {
-                       $GLOBALS['TSFE']->additionalHeaderData[$lib] = '<script type="text/javascript" src="' . $this->backPath . $lib . '"></script>';
-               }
+               /** @var $pageRenderer t3lib_PageRenderer */
+               $pageRenderer = $GLOBALS['TSFE']->getPageRenderer();
+               $pageRenderer->addJsLibrary($lib, $this->backPath . $lib);
+               
        }
 
        /**
@@ -151,9 +152,9 @@ class t3lib_TCEforms_FE extends t3lib_TCEforms {
         * @return      void
         */
        public function addStyleSheet($key, $href, $title='', $relation='stylesheet') {
-               if (!isset($GLOBALS['TSFE']->additionalHeaderData[$key])) {
-                       $GLOBALS['TSFE']->additionalHeaderData[$key] = '<link rel="' . $relation . '" type="text/css" href="' . $href . '"' . ($title ? (' title="' . $title . '"') : '') . ' />';
-               }
+               /** @var $pageRenderer t3lib_PageRenderer */
+               $pageRenderer = $GLOBALS['TSFE']->getPageRenderer();
+               $pageRenderer->addCssFile($this->backPath . $href, $relation, 'screen', $title);
         }
 
        /**