[BUGFIX] hmenu.special = list must evaluate showAccessRestrictedPages 65/40765/2
authorGilles FOUET <gifou@smile.fr>
Tue, 16 Jun 2015 15:59:28 +0000 (17:59 +0200)
committerMarkus Klein <markus.klein@typo3.org>
Tue, 30 Jun 2015 10:21:28 +0000 (12:21 +0200)
For menus of type "list" the option showAccessRestrictedPages is now
taken into account as well and the enableFields omit the fe_group
contraint if the option is set.

Resolves: #16840
Releases: master, 6.2
Change-Id: I4203bf0087367781ecee15fe3aa42deea8d34039
Reviewed-on: http://review.typo3.org/40765
Reviewed-by: Markus Klein <markus.klein@typo3.org>
Tested-by: Markus Klein <markus.klein@typo3.org>
typo3/sysext/frontend/Classes/ContentObject/Menu/AbstractMenuContentObject.php

index 397e367..0212cfd 100644 (file)
@@ -480,11 +480,15 @@ class AbstractMenuContentObject {
                                                if ($value == '') {
                                                        $value = $this->id;
                                                }
+                                               $skippedEnableFields = array();
+                                               if (!empty($this->mconf['showAccessRestrictedPages'])) {
+                                                       $skippedEnableFields = array('fe_group' => 1);
+                                               }
                                                /** @var \TYPO3\CMS\Core\Database\RelationHandler $loadDB*/
                                                $loadDB = GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\Database\\RelationHandler');
                                                $loadDB->setFetchAllFields(TRUE);
                                                $loadDB->start($value, 'pages');
-                                               $loadDB->additionalWhere['pages'] = $this->parent_cObj->enableFields('pages');
+                                               $loadDB->additionalWhere['pages'] = $this->parent_cObj->enableFields('pages', FALSE, $skippedEnableFields);
                                                $loadDB->getFromDB();
                                                foreach ($loadDB->itemArray as $val) {
                                                        $MP = $this->tmpl->getFromMPmap($val['id']);