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.