[BUGFIX] Link to ext:perm in clickmenu not working 51/33551/2
authorWouter Wolters <typo3@wouterwolters.nl>
Fri, 24 Oct 2014 17:59:24 +0000 (19:59 +0200)
committerMarkus Klein <klein.t3@reelworx.at>
Sun, 26 Oct 2014 14:43:15 +0000 (15:43 +0100)
The link refers directly to index.php instead of mod.php.
Use BackendUtility::getModuleUrl() for the link to fix the problem.

Change-Id: I7cdda9f592e331c95bbb3c5d301907bd77761ec5
Resolves: #62459
Related: #38099
Releases: master, 6.2, 6.1
Reviewed-on: http://review.typo3.org/33551
Reviewed-by: Markus Klein <klein.t3@reelworx.at>
Tested-by: Markus Klein <klein.t3@reelworx.at>
typo3/sysext/backend/Classes/ClickMenu/ClickMenu.php

index 4daf4ca..58ad330 100644 (file)
@@ -463,7 +463,17 @@ class ClickMenu {
                if (!ExtensionManagementUtility::isLoaded('perm')) {
                        return '';
                }
-               $url = ExtensionManagementUtility::extRelPath('perm') . 'mod1/index.php?id=' . $uid . ($rec['perms_userid'] == $GLOBALS['BE_USER']->user['uid'] || $GLOBALS['BE_USER']->isAdmin() ? '&return_id=' . $uid . '&edit=1' : '');
+
+               $parameters = array(
+                       'id' => $uid,
+               );
+
+               if ($rec['perms_userid'] == $GLOBALS['BE_USER']->user['uid'] || $GLOBALS['BE_USER']->isAdmin()) {
+                       $parameters['return_id'] = $uid;
+                       $parameters['edit'] = '1';
+               }
+
+               $url = BackendUtility::getModuleUrl('web_perm', $parameters);
                return $this->linkItem($GLOBALS['LANG']->makeEntities($GLOBALS['LANG']->getLL('CM_perms')), $this->excludeIcon(IconUtility::getSpriteIcon('status-status-locked')), $this->urlRefForCM($url), 0);
        }