Project

General

Profile

Actions

Task #56721

closed

Epic #55070: Workpackages

Epic #55066: WP: Security enhancements

Story #55516: Reduce the number of backend script entry points

ElementBrowser::getThisScript is not public

Added by Philipp Wrann over 10 years ago. Updated about 7 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Backend API
Target version:
Start date:
2014-03-10
Due date:
% Done:

100%

Estimated time:
1.00 h
TYPO3 Version:
6.2
PHP Version:
Tags:
Complexity:
no-brainer
Sprint Focus:

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.

Actions #1

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

Actions #2

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

Actions #3

Updated by Ernesto Baschny over 10 years ago

  • Subject changed from Getter is not public to ElementBrowser::getThisScript is not public
Actions #4

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

Actions #5

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

Actions #6

Updated by Georg Ringer over 10 years ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100
Actions #7

Updated by Markus Klein over 10 years ago

  • Status changed from Resolved to Under Review
Actions #8

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

Actions #9

Updated by Helmut Hummel over 10 years ago

  • Parent task set to #55516
Actions #10

Updated by Helmut Hummel over 10 years ago

  • Estimated time changed from 0.10 h to 1.00 h
Actions #11

Updated by Helmut Hummel over 10 years ago

  • Status changed from Under Review to Resolved
Actions #12

Updated by Riccardo De Contardi about 7 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF