* Fixed bug #200: fe_adminLib: hard-coded Form URL, should be typolink
authorBernhard Kraft <kraftb@think-open.at>
Wed, 19 Oct 2005 14:26:07 +0000 (14:26 +0000)
committerBernhard Kraft <kraftb@think-open.at>
Wed, 19 Oct 2005 14:26:07 +0000 (14:26 +0000)
git-svn-id: https://svn.typo3.org/TYPO3v4/Core/trunk@823 709f56b5-9817-0410-a4d7-c38de5d9e867

ChangeLog
typo3/sysext/cms/tslib/media/scripts/fe_adminLib.inc

index 767cb0c..dde8328 100755 (executable)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2005-10-19  Bernhard Kraft  <kraftb@kraftb.at>
+
+ * Fixed bug #200: fe_adminLib: hard-coded Form URL, should be typolink
+
 2005-10-17  Kasper Skårhøj  <kasper2005@typo3.com>
 
  * Fixed wrong page-not-found header from "Status: 404 ..." to "HTTP/1.0 404..."
index fb93c95..4a14f9d 100755 (executable)
@@ -194,8 +194,8 @@ class user_feAdmin  {
                $this->authCode = t3lib_div::_GP('aC');
                        // get table
                $this->theTable = $this->conf['table'];
-
-               $this->nc = $this->conf['no_cache'] ? '&no_cache=1' : $this->nc;
+                       // link configuration
+               $linkConf = is_array($this->conf['formurl.']) ? $this->conf['formurl.'] : array();
                        // pid
                $this->thePid = intval($this->conf['pid']) ? intval($this->conf['pid']) : $GLOBALS['TSFE']->id;
                        //
@@ -212,8 +212,18 @@ class user_feAdmin {
                $this->markerArray['###GC2###'] = $this->cObj->stdWrap($this->conf['color2'],$this->conf['color2.']);
                $this->markerArray['###GC3###'] = $this->cObj->stdWrap($this->conf['color3'],$this->conf['color3.']);
 
+               if (intval($this->conf['no_cache']) && !isset($linkConf['no_cache']))   {       // needed for backwards compatibility
+                       $linkConf['no_cache'] = 1;
+               }
+               if(!$linkConf['parameter'])     {
+                       $linkConf['parameter'] = $GLOBALS['TSFE']->id;
+               }
+               if(!$linkConf['additionalParams'])      {       // needed for backwards compatibility
+                       $linkConf['additionalParams'] = $this->conf['addParams'];
+               }
+
                        // Initialize markerArray, setting FORM_URL and HIDDENFIELDS
-               $this->markerArray['###FORM_URL###'] = 'index.php?id='.$GLOBALS['TSFE']->id.'&type='.$GLOBALS['TSFE']->type.$this->nc.$this->conf['addParams'];
+               $this->markerArray['###FORM_URL###'] = $this->cObj->typoLink_URL($linkConf);
                $this->markerArray['###FORM_URL_ENC###'] = rawurlencode($this->markerArray['###FORM_URL###']);
                $this->markerArray['###FORM_URL_HSC###'] = htmlspecialchars($this->markerArray['###FORM_URL###']);