Skip to content
This repository has been archived by the owner on May 4, 2021. It is now read-only.

Commit

Permalink
[BUGFIX] Remove trailing or leading comma from CSV list of columns
Browse files Browse the repository at this point in the history
Resolves: #83514
Releases: master, 8-0, 7-0
Change-Id: If154c64f884376f356238909f671caf27204aff4
Reviewed-on: https://review.typo3.org/55302
Reviewed-by: Jo Hasenau <info@cybercraft.de>
Tested-by: Jo Hasenau <info@cybercraft.de>
  • Loading branch information
Bunnyfield committed Jan 10, 2018
1 parent 7a7abec commit 0a28d8d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Classes/DataHandler/AfterDatabaseOperations.php
Original file line number Diff line number Diff line change
Expand Up @@ -380,7 +380,7 @@ public function getAvailableColumns($layout = '', $table = '', $id = 0)
}
}
// Implode into a CSV string as BackendLayoutView->getColPosListItemsParsed returns an array
$tcaColumns = '-2,-1,' . implode(',', $temp);
$tcaColumns = rtrim('-2,-1,' . implode(',', $temp), ',');
}
return $tcaColumns;
}
Expand Down
2 changes: 1 addition & 1 deletion Classes/Plugin/Gridelements.php
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ public function main($content = '', $conf = [])
$layoutSetup->init($this->cObj->data['pid'], $conf);

$availableColumns = $layoutSetup->getLayoutColumns($layout);
$csvColumns = str_replace('-2,-1,', '', $availableColumns['CSV']);
$csvColumns = ltrim(str_replace('-2,-1', '', $availableColumns['CSV']), ',');
$this->getChildren($element, $pid, $csvColumns);

// and we have to determine the frontend setup related to the backend layout record which is assigned to this container
Expand Down

0 comments on commit 0a28d8d

Please sign in to comment.