Commit d30296ab authored by Andreas Allacher's avatar Andreas Allacher Committed by Christian Kuhn
Browse files

[FOLLOWUP][BUGFIX] PageLayoutController must only use available actions for view/edit

Ensure that only available actions are shown via PageLayoutController,
e.g. if you remove QuickEdit and the user had previously set the module
to QuickEdit.

Change-Id: Ief52e837a478217d9436f2620da6c953afa72102
Resolves: #70767
Releases: master
Reviewed-on: https://review.typo3.org/44420

Reviewed-by: Andreas Fernandez's avatarAndreas Fernandez <typo3@scripting-base.de>
Reviewed-by: default avatarMichael Oehlhof <typo3@oehlhof.de>
Reviewed-by: Jan Helke's avatarJan Helke <typo3@helke.de>
Tested-by: Jan Helke's avatarJan Helke <typo3@helke.de>
Reviewed-by: Christian Kuhn's avatarChristian Kuhn <lolli@schwarzbu.ch>
Tested-by: Christian Kuhn's avatarChristian Kuhn <lolli@schwarzbu.ch>
parent 9d1b50fc
......@@ -444,14 +444,16 @@ class PageLayoutController
$actionMenu->setLabel('');
$defaultKey = null;
$foundDefaultKey = false;
foreach ($availableActionArray as $key => $action) {
$menuItem = $actionMenu
->makeMenuItem()
->setTitle($action)
->setHref(BackendUtility::getModuleUrl($this->moduleName) . '&id=' . $this->id . '&SET[function]=' . $key);
if (!isset($defaultKey)) {
if (!$foundDefaultKey) {
$defaultKey = $key;
$foundDefaultKey = true;
}
if ((int)$this->MOD_SETTINGS['function'] === $key) {
$menuItem->setActive(true);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment