fixed bug #7265: Submodules of Web module can't work with mod.php and the _DISPATCH...
authorSteffen Kamper <info@sk-typo3.de>
Thu, 18 Dec 2008 18:37:14 +0000 (18:37 +0000)
committerSteffen Kamper <info@sk-typo3.de>
Thu, 18 Dec 2008 18:37:14 +0000 (18:37 +0000)
git-svn-id: https://svn.typo3.org/TYPO3v4/Core/trunk@4570 709f56b5-9817-0410-a4d7-c38de5d9e867

ChangeLog
typo3/alt_db_navframe.php
typo3/alt_file_navframe.php
typo3/alt_mod_frameset.php
typo3/template.php

index 8a3fc3d..87e6c09 100755 (executable)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2008-12-18  Steffen Kamper  <info@sk-typo3.de>
+
+       * Fixed bug #7265: Submodules of Web module can't work with mod.php and the _DISPATCH system
+
 2008-12-18  Dmitry Dulepov  <dmitry@typo3.org>
 
        * Fixed bug #9944: Unneccessary wildcard string comparisons in EM (thanks to Marcus Krause)
index b36889a..6e3f421 100755 (executable)
@@ -166,11 +166,19 @@ class SC_alt_db_navframe {
 
                // Function, loading the list frame from navigation tree:
                function jumpTo(id, linkObj, highlightID, bank) { //
-                       var theUrl = top.TS.PATH_typo3 + top.currentSubScript + "?id=" + id;
+                       var theUrl = top.TS.PATH_typo3 + top.currentSubScript ;
+                       if (theUrl.indexOf("?") != -1) {
+                               theUrl += "&id=" + id
+                       } else {
+                               theUrl += "?id=" + id                   
+                       }       
                        top.fsMod.currentBank = bank;
 
-                       if (top.condensedMode) top.content.location.href = theUrl;
-                       else                   parent.list_frame.location.href=theUrl;
+                       if (top.condensedMode) {
+                               top.content.location.href = theUrl;
+                       } else {
+                               parent.list_frame.location.href=theUrl;
+                       }
 
                        '.($this->doHighlight ? 'Tree.highlightActiveItem("web", highlightID + "_" + bank);' : '').'
                        '.(!$GLOBALS['CLIENT']['FORMSTYLE'] ? '' : 'if (linkObj) linkObj.blur(); ').'
@@ -404,4 +412,4 @@ if (!(TYPO3_REQUESTTYPE & TYPO3_REQUESTTYPE_AJAX)) {
        $SOBE->printContent();
 }
 
-?>
\ No newline at end of file
+?>
index 769d468..689b742 100755 (executable)
@@ -139,11 +139,19 @@ class SC_alt_file_navframe {
 
                // Function, loading the list frame from navigation tree:
                function jumpTo(id, linkObj, highlightID, bank) {
-                       var theUrl = top.TS.PATH_typo3 + top.currentSubScript + "?id=" + id;
+                       var theUrl = top.TS.PATH_typo3 + top.currentSubScript ;
+                       if (theUrl.indexOf("?") != -1) {
+                               theUrl += "&id=" + id
+                       } else {
+                               theUrl += "?id=" + id                   
+                       }       
                        top.fsMod.currentBank = bank;
 
-                       if (top.condensedMode) top.content.location.href = theUrl;
-                       else                   parent.list_frame.location.href = theUrl;
+                       if (top.condensedMode) {
+                               top.content.location.href = theUrl;
+                       } else {
+                               parent.list_frame.location.href=theUrl;
+                       }
 
                        '.($this->doHighlight ? 'Tree.highlightActiveItem("file", highlightID + "_" + bank);' : '').'
                        '.(!$CLIENT['FORMSTYLE'] ? '' : 'if (linkObj) linkObj.blur(); ').'
@@ -265,4 +273,4 @@ if (!(TYPO3_REQUESTTYPE & TYPO3_REQUESTTYPE_AJAX)) {
        $SOBE->printContent();
 }
 
-?>
\ No newline at end of file
+?>
index e62abd6..964e0f7 100755 (executable)
@@ -108,8 +108,8 @@ class SC_alt_mod_frameset {
                $URL_nav = htmlspecialchars($nav.'&currentSubScript='.rawurlencode($script));
 
                        // List frame URL:
-               $URL_list = htmlspecialchars($this->exScript?$this->exScript:($script.($this->id?'?id='.rawurlencode($this->id):'')));
-
+               $URL_list = htmlspecialchars($this->exScript ? $this->exScript : ($script . ($this->id ? (strpos($script, '?') ? '&' : '?' ) . 'id=' . rawurlencode($this->id) : '')));
+                       
                        // Start page output
                $TBE_TEMPLATE->docType='xhtml_frames';
                $this->content = $TBE_TEMPLATE->startPage('Frameset');
@@ -166,4 +166,4 @@ $SOBE = t3lib_div::makeInstance('SC_alt_mod_frameset');
 $SOBE->main();
 $SOBE->printContent();
 
-?>
\ No newline at end of file
+?>
index d3ae399..2fa1d25 100755 (executable)
@@ -228,7 +228,11 @@ class template {
                global $TBE_STYLES;
 
                        // Setting default scriptID:
-               $this->scriptID = ereg_replace('^.*\/(sysext|ext)\/','ext/',substr(PATH_thisScript,strlen(PATH_site)));
+               if (($temp_M = (string) t3lib_div::_GET('M')) && $GLOBALS['TBE_MODULES']['_PATHS'][$temp_M]) {
+                       $this->scriptID = ereg_replace('^.*\/(sysext|ext)\/', 'ext/', $GLOBALS['TBE_MODULES']['_PATHS'][$temp_M] . 'index.php');
+               } else {
+                       $this->scriptID = ereg_replace('^.*\/(sysext|ext)\/', 'ext/', substr(PATH_thisScript, strlen(PATH_site)));
+               }
                if (TYPO3_mainDir!='typo3/' && substr($this->scriptID,0,strlen(TYPO3_mainDir)) == TYPO3_mainDir)        {
                        $this->scriptID = 'typo3/'.substr($this->scriptID,strlen(TYPO3_mainDir));       // This fixes if TYPO3_mainDir has been changed so the script ids are STILL "typo3/..."
                }
@@ -2049,4 +2053,4 @@ if (defined('TYPO3_MODE') && $TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['typo3/templ
 // ******************************
 $GLOBALS['TBE_TEMPLATE'] = t3lib_div::makeInstance('template');
 
-?>
\ No newline at end of file
+?>