[BUGFIX] Remove addQueryStringMethod parameter from widget links 32/46332/2
authorNicole Cordes <typo3@cordes.co>
Fri, 29 Jan 2016 09:35:48 +0000 (10:35 +0100)
committerHelmut Hummel <helmut.hummel@typo3.org>
Fri, 29 Jan 2016 13:38:10 +0000 (14:38 +0100)
Resolves: #58752
Releases: master, 7.6, 6.2
Change-Id: I1d03d62cf0028089bdd0c5a6e7ef555be36349fb
Reviewed-on: https://review.typo3.org/46332
Reviewed-by: Helmut Hummel <helmut.hummel@typo3.org>
Tested-by: Helmut Hummel <helmut.hummel@typo3.org>
typo3/sysext/fluid/Classes/ViewHelpers/Widget/LinkViewHelper.php
typo3/sysext/fluid/Classes/ViewHelpers/Widget/UriViewHelper.php

index afa7220..09fe28b 100644 (file)
@@ -117,9 +117,13 @@ class LinkViewHelper extends \TYPO3\CMS\Fluid\Core\ViewHelper\AbstractTagBasedVi
         if ($this->hasArgument('format') && $this->arguments['format'] !== '') {
             $arguments['format'] = $this->arguments['format'];
         }
-        if ($this->hasArgument('addQueryStringMethod') && $this->arguments['addQueryStringMethod'] !== '') {
-            $arguments['addQueryStringMethod'] = $this->arguments['addQueryStringMethod'];
-        }
-        return $uriBuilder->reset()->setArguments(array($argumentPrefix => $arguments))->setSection($this->arguments['section'])->setAddQueryString(true)->setAddQueryStringMethod($this->arguments['addQueryStringMethod'])->setArgumentsToBeExcludedFromQueryString(array($argumentPrefix, 'cHash'))->setFormat($this->arguments['format'])->build();
+        return $uriBuilder->reset()
+            ->setArguments(array($argumentPrefix => $arguments))
+            ->setSection($this->arguments['section'])
+            ->setAddQueryString(true)
+            ->setAddQueryStringMethod($this->arguments['addQueryStringMethod'])
+            ->setArgumentsToBeExcludedFromQueryString(array($argumentPrefix, 'cHash'))
+            ->setFormat($this->arguments['format'])
+            ->build();
     }
 }
index adbc641..2fab219 100644 (file)
@@ -104,9 +104,13 @@ class UriViewHelper extends \TYPO3\CMS\Fluid\Core\ViewHelper\AbstractViewHelper
         if ($this->hasArgument('format') && $this->arguments['format'] !== '') {
             $arguments['format'] = $this->arguments['format'];
         }
-        if ($this->hasArgument('addQueryStringMethod') && $this->arguments['addQueryStringMethod'] !== '') {
-            $arguments['addQueryStringMethod'] = $this->arguments['addQueryStringMethod'];
-        }
-        return $uriBuilder->reset()->setArguments(array($argumentPrefix => $arguments))->setSection($this->arguments['section'])->setAddQueryString(true)->setAddQueryStringMethod($this->arguments['addQueryStringMethod'])->setArgumentsToBeExcludedFromQueryString(array($argumentPrefix, 'cHash'))->setFormat($this->arguments['format'])->build();
+        return $uriBuilder->reset()
+            ->setArguments(array($argumentPrefix => $arguments))
+            ->setSection($this->arguments['section'])
+            ->setAddQueryString(true)
+            ->setAddQueryStringMethod($this->arguments['addQueryStringMethod'])
+            ->setArgumentsToBeExcludedFromQueryString(array($argumentPrefix, 'cHash'))
+            ->setFormat($this->arguments['format'])
+            ->build();
     }
 }