[BUGFIX] Followup 2 to mod.SHARED.colPos_list fix 43/32743/2
authorJigal van Hemert <jigal.van.hemert@typo3.org>
Wed, 10 Sep 2014 19:34:41 +0000 (21:34 +0200)
committerHelmut Hummel <helmut.hummel@typo3.org>
Fri, 12 Sep 2014 15:58:00 +0000 (17:58 +0200)
Deal with empty mod.SHARED and fill activeColPosList with colPosList
in case the TSconfig setting is empty.

Resolves: #39967
Releases: 6.2, 6.3
Change-Id: I5e2e4420de8f1d603e13a03758f97803e545d9a3
Reviewed-on: http://review.typo3.org/32743
Reviewed-by: Helmut Hummel <helmut.hummel@typo3.org>
Tested-by: Helmut Hummel <helmut.hummel@typo3.org>
typo3/sysext/backend/Classes/Controller/PageLayoutController.php

index 5b23734..e694ce9 100644 (file)
@@ -540,7 +540,7 @@ class PageLayoutController {
                        // Removing duplicates, if any
                        $this->colPosList = array_unique(GeneralUtility::intExplode(',', $this->colPosList));
                        // Accessible columns
-                       if (trim($this->modSharedTSconfig['properties']['colPos_list']) !== '') {
+                       if (isset($this->modSharedTSconfig['properties']['colPos_list']) && trim($this->modSharedTSconfig['properties']['colPos_list']) !== '') {
                                $this->activeColPosList = array_unique(GeneralUtility::intExplode(',', trim($this->modSharedTSconfig['properties']['colPos_list'])));
                                // Match with the list which is present in the colPosList for the current page
                                if (!empty($this->colPosList) && !empty($this->activeColPosList)) {
@@ -549,8 +549,10 @@ class PageLayoutController {
                                                $this->colPosList
                                        ));
                                }
-                               $this->activeColPosList = implode(',', $this->activeColPosList);
+                       } else {
+                               $this->activeColPosList = $this->colPosList;
                        }
+                       $this->activeColPosList = implode(',', $this->activeColPosList);
                        $this->colPosList = implode(',', $this->colPosList);
 
                        // Page title