[BUGFIX] Remove addQueryStringMethod parameter from widget links 50/46350/2
authorNicole Cordes <typo3@cordes.co>
Fri, 29 Jan 2016 13:42:20 +0000 (14:42 +0100)
committerBenni Mack <benni@typo3.org>
Wed, 17 Feb 2016 09:31:48 +0000 (10:31 +0100)
Resolves: #58752
Releases: master, 7.6, 6.2
Change-Id: I1d03d62cf0028089bdd0c5a6e7ef555be36349fb
Reviewed-on: https://review.typo3.org/46350
Reviewed-by: Stefan Froemken <froemken@gmail.com>
Tested-by: Stefan Froemken <froemken@gmail.com>
Reviewed-by: Benni Mack <benni@typo3.org>
Tested-by: Benni Mack <benni@typo3.org>
typo3/sysext/fluid/Classes/ViewHelpers/Widget/LinkViewHelper.php
typo3/sysext/fluid/Classes/ViewHelpers/Widget/UriViewHelper.php

index 6094174..6095227 100644 (file)
@@ -113,9 +113,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 dbd5372..7952174 100644 (file)
@@ -100,9 +100,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();
        }
 }