[BUGFIX] Make typolink respect property linkAccessRestrictedPages 23/35923/2
authorFrederic Gaus <gaus@flagbit.de>
Thu, 8 Jan 2015 17:10:32 +0000 (18:10 +0100)
committerMarkus Klein <klein.t3@reelworx.at>
Fri, 9 Jan 2015 10:43:08 +0000 (11:43 +0100)
With this patch typolink does link access restricted pages when
the typolink configuration has $conf['linkAccessRestrictedPages']
set and config.typolinkLinkAccessRestrictedPages is set.

Without the patch, typolink does not link access restricted pages
in this configuration but takes the configuration of
config.typolinkLinkAccessRestrictedPages into account.

Change-Id: Ief1e56fa68e6818e2739d642510cf016e094e399
Resolves: #63804
Releases: master, 6.2
Reviewed-on: http://review.typo3.org/35923
Reviewed-by: Markus Klein <klein.t3@reelworx.at>
Tested-by: Markus Klein <klein.t3@reelworx.at>
typo3/sysext/frontend/Classes/ContentObject/ContentObjectRenderer.php

index 660a141..7b75293 100644 (file)
@@ -6120,7 +6120,7 @@ class ContentObjectRenderer {
                                                        }
                                                }
                                                // If link is to a access restricted page which should be redirected, then find new URL:
-                                               if ($GLOBALS['TSFE']->config['config']['typolinkLinkAccessRestrictedPages'] && $GLOBALS['TSFE']->config['config']['typolinkLinkAccessRestrictedPages'] !== 'NONE' && !$GLOBALS['TSFE']->checkPageGroupAccess($page)) {
+                                               if (empty($conf['linkAccessRestrictedPages']) && $GLOBALS['TSFE']->config['config']['typolinkLinkAccessRestrictedPages'] && $GLOBALS['TSFE']->config['config']['typolinkLinkAccessRestrictedPages'] !== 'NONE' && !$GLOBALS['TSFE']->checkPageGroupAccess($page)) {
                                                        $thePage = $GLOBALS['TSFE']->sys_page->getPage($GLOBALS['TSFE']->config['config']['typolinkLinkAccessRestrictedPages']);
                                                        $addParams = str_replace(
                                                                array(