Task #56721
closedEpic #55070: Workpackages
Epic #55066: WP: Security enhancements
Story #55516: Reduce the number of backend script entry points
ElementBrowser::getThisScript is not public
100%
Description
In \TYPO3\CMS\Recordlist\Browser\ElementBrowser the method getThisScript is not public but you need it in your hooks fot the LinkBrowser (to generate a valid url). You can use the public property but as the core implementation is like:
$menuDef['page']['addParams'] = 'onclick="jumpToUrl(' . GeneralUtility::quoteJSvalue($this->getThisScript() . 'act=page') . ');return false;"';
It should be possible to use this method also from your hook
So please simple change accessibility for getThisScript to public.
Otherwise you have to do this in every single hook:
$script = strpos($this->parentObject->thisScript, '?') === FALSE ? $this->parentObject->thisScript . '?' : $this->parentObject->thisScript . '&';
$menuDefinition['KEY']['addParams'] = 'onclick="jumpToUrl(' . GeneralUtility::quoteJSvalue($script . 'act=KEY') . ');return false;"';
Additionally i have to say:
The common way before to generate the tab link was
$menuDefinition['KEY']['addParams'] = 'onclick="jumpToUrl(\'' . htmlspecialchars(('?act=KEY&mode=' . $this->parentObject->mode . '&bparams=' . $this->parentObject->bparams)) . '\');return false;"';
This is not compatible with TYPO3 6.2 anymore because of this new moduleToken, so it might be better to rethink that behaviour for the whole wizard. Otherwise many extension would be broken in that context.
Updated by Gerrit Code Review over 10 years ago
- Status changed from New to Under Review
Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/28337
Updated by Gerrit Code Review over 10 years ago
Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/28337
Updated by Ernesto Baschny over 10 years ago
- Subject changed from Getter is not public to ElementBrowser::getThisScript is not public
Updated by Gerrit Code Review over 10 years ago
Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/28479
Updated by Markus Klein over 10 years ago
First patch was reverted in https://review.typo3.org/28478.
Repushed under https://review.typo3.org/28479
Updated by Georg Ringer over 10 years ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset b2756fe7826d62fdc8442c887010890c268eabd8.
Updated by Markus Klein over 10 years ago
- Status changed from Resolved to Under Review
Updated by Gerrit Code Review over 10 years ago
Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/28618
Updated by Helmut Hummel over 10 years ago
- Estimated time changed from 0.10 h to 1.00 h
Updated by Helmut Hummel over 10 years ago
- Status changed from Under Review to Resolved
Applied in changeset 2144d4c6e0f997f824e9dc41eb3eafb2b48a180d.
Updated by Riccardo De Contardi about 7 years ago
- Status changed from Resolved to Closed