Fixed bug #16405: pageRenderer call addJsFile with leaving out 2nd parameter
authorSteffen Kamper <info@sk-typo3.de>
Tue, 16 Nov 2010 16:52:17 +0000 (16:52 +0000)
committerSteffen Kamper <info@sk-typo3.de>
Tue, 16 Nov 2010 16:52:17 +0000 (16:52 +0000)
git-svn-id: https://svn.typo3.org/TYPO3v4/Core/trunk@9404 709f56b5-9817-0410-a4d7-c38de5d9e867

ChangeLog
t3lib/class.t3lib_pagerenderer.php

index eb6b55b..9b1d247 100755 (executable)
--- a/ChangeLog
+++ b/ChangeLog
@@ -17,6 +17,7 @@
 
 2010-11-16  Steffen Kamper  <steffen@typo3.org>
 
+       * Fixed bug #16405: pageRenderer call addJsFile with leaving out 2nd parameter
        * Follow-up to #16408: Support for Custom Navigation Components: removed warning
        * Follow-up to #16315: New extension manager part 1: splitting classes: fixed many small issues
        * Added feature #16408: Support for Custom Navigation Components (Thanks to Stefan Galinski)
index 6871ad5..3417132 100644 (file)
@@ -786,6 +786,9 @@ class t3lib_PageRenderer implements t3lib_Singleton {
         * @return void
         */
        public function addJsLibrary($name, $file, $type = 'text/javascript', $compress = FALSE, $forceOnTop = FALSE, $allWrap = '') {
+               if (!$type) {
+                       $type = 'text/javascript';
+               }
                if (!in_array(strtolower($name), $this->jsLibs)) {
                        $this->jsLibs[strtolower($name)] = array (
                                'file'        => $file,
@@ -811,6 +814,9 @@ class t3lib_PageRenderer implements t3lib_Singleton {
         * @return void
         */
        public function addJsFooterLibrary($name, $file, $type = 'text/javascript', $compress = FALSE, $forceOnTop = FALSE, $allWrap = '') {
+               if (!$type) {
+                       $type = 'text/javascript';
+               }
                if (!in_array(strtolower($name), $this->jsLibs)) {
                        $this->jsLibs[strtolower($name)] = array (
                                'file'        => $file,
@@ -835,6 +841,9 @@ class t3lib_PageRenderer implements t3lib_Singleton {
         * @return void
         */
        public function addJsFile($file, $type = 'text/javascript', $compress = TRUE, $forceOnTop = FALSE, $allWrap = '') {
+               if (!$type) {
+                       $type = 'text/javascript';
+               }
                if (!isset($this->jsFiles[$file])) {
                        $this->jsFiles[$file] = array (
                                'type'        => $type,
@@ -856,6 +865,9 @@ class t3lib_PageRenderer implements t3lib_Singleton {
         * @return void
         */
        public function addJsFooterFile($file, $type = 'text/javascript', $compress = TRUE, $forceOnTop = FALSE, $allWrap = '') {
+               if (!$type) {
+                       $type = 'text/javascript';
+               }
                if (!isset($this->jsFiles[$file])) {
                        $this->jsFiles[$file] = array (
                                'type'        => $type,