[BUGFIX] Enable BE search for multiple mountpoints
[Packages/TYPO3.CMS.git] / typo3 / sysext / recordlist / Classes / RecordList.php
index 409808a..3595d07 100644 (file)
@@ -182,12 +182,12 @@ class RecordList {
                $this->MCONF = $GLOBALS['MCONF'];
                $this->perms_clause = $GLOBALS['BE_USER']->getPagePermsClause(1);
                // GPvars:
-               $this->id = (int) GeneralUtility::_GP('id');
+               $this->id = (int)GeneralUtility::_GP('id');
                $this->pointer = GeneralUtility::_GP('pointer');
                $this->imagemode = GeneralUtility::_GP('imagemode');
                $this->table = GeneralUtility::_GP('table');
                $this->search_field = GeneralUtility::_GP('search_field');
-               $this->search_levels = GeneralUtility::_GP('search_levels');
+               $this->search_levels = (int)GeneralUtility::_GP('search_levels');
                $this->showLimit = GeneralUtility::_GP('showLimit');
                $this->returnUrl = GeneralUtility::sanitizeLocalUrl(GeneralUtility::_GP('returnUrl'));
                $this->clear_cache = GeneralUtility::_GP('clear_cache');
@@ -281,8 +281,8 @@ class RecordList {
                $dblist->hideTranslations = $this->modTSconfig['properties']['hideTranslations'];
                $dblist->tableTSconfigOverTCA = $this->modTSconfig['properties']['table.'];
                $dblist->alternateBgColors = $this->modTSconfig['properties']['alternateBgColors'] ? 1 : 0;
-               $dblist->allowedNewTables = GeneralUtility::trimExplode(',', $this->modTSconfig['properties']['allowedNewTables'], 1);
-               $dblist->deniedNewTables = GeneralUtility::trimExplode(',', $this->modTSconfig['properties']['deniedNewTables'], 1);
+               $dblist->allowedNewTables = GeneralUtility::trimExplode(',', $this->modTSconfig['properties']['allowedNewTables'], TRUE);
+               $dblist->deniedNewTables = GeneralUtility::trimExplode(',', $this->modTSconfig['properties']['deniedNewTables'], TRUE);
                $dblist->newWizards = $this->modTSconfig['properties']['newWizards'] ? 1 : 0;
                $dblist->pageRow = $this->pageinfo;
                $dblist->counter++;
@@ -317,8 +317,8 @@ class RecordList {
                // This flag will prevent the clipboard panel in being shown.
                // It is set, if the clickmenu-layer is active AND the extended view is not enabled.
                $dblist->dontShowClipControlPanels = $GLOBALS['CLIENT']['FORMSTYLE'] && !$this->MOD_SETTINGS['bigControlPanel'] && $dblist->clipObj->current == 'normal' && !$this->modTSconfig['properties']['showClipControlPanelsDespiteOfCMlayers'];
-               // If there is access to the page, then render the list contents and set up the document template object:
-               if ($access) {
+               // If there is access to the page or root page is used for searching, then render the list contents and set up the document template object:
+               if ($access || ($this->id === 0 && $this->search_levels > 0 && strlen($this->search_field) > 0)) {
                        // Deleting records...:
                        // Has not to do with the clipboard but is simply the delete action. The clipboard object is used to clean up the submitted entries to only the selected table.
                        if ($this->cmd == 'delete') {
@@ -486,6 +486,3 @@ class RecordList {
        }
 
 }
-
-
-?>
\ No newline at end of file