[BUGFIX] Link to ext:perm in clickmenu not working 10/33510/3
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:42:51 +0000 (15:42 +0100)
The link refers directly to index.php instead of mod.php.
Use BackendUtility::getModuleUrl() for the link to fix the problem.

Resolves: #62459
Related: #38099
Releases: master, 6.2, 6.1
Change-Id: I3b86d97a4f35a96ca39af28e724067b5ec8a832f
Reviewed-on: http://review.typo3.org/33510
Reviewed-by: Tymoteusz Motylewski <t.motylewski@gmail.com>
Tested-by: Tymoteusz Motylewski <t.motylewski@gmail.com>
Reviewed-by: Markus Klein <klein.t3@reelworx.at>
Tested-by: Markus Klein <klein.t3@reelworx.at>
typo3/sysext/backend/Classes/ClickMenu/ClickMenu.php

index 85e00d9..bcbec8b 100644 (file)
@@ -569,7 +569,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);
        }