Commit b9fc9478 authored by Wouter Wolters's avatar Wouter Wolters Committed by Stefan Neufeind
Browse files

[TASK] Use real boolean value for trimExplode third param

Make use of boolean value TRUE as third parameter in
trimExplode function.

Change-Id: Ied33efac6cddfc2e2798435fe9b1ef748c11905b
Resolves: #50402
Releases: 6.2
Reviewed-on: https://review.typo3.org/22542
Reviewed-by: Markus Klein
Tested-by: Markus Klein
Reviewed-by: Stefan Neufeind
Tested-by: Stefan Neufeind
parent a085e54f
......@@ -178,7 +178,7 @@ class ClickMenu {
$this->isDBmenu = 1;
}
$TSkey = ($this->isDBmenu ? 'page' : 'folder') . ($this->listFrame ? 'List' : 'Tree');
$this->disabledItems = GeneralUtility::trimExplode(',', $GLOBALS['BE_USER']->getTSConfigVal('options.contextMenu.' . $TSkey . '.disableItems'), 1);
$this->disabledItems = GeneralUtility::trimExplode(',', $GLOBALS['BE_USER']->getTSConfigVal('options.contextMenu.' . $TSkey . '.disableItems'), TRUE);
$this->leftIcons = $GLOBALS['BE_USER']->getTSConfigVal('options.contextMenu.options.leftIcons');
// &cmLevel flag detected (2nd level menu)
if (!$this->cmLevel) {
......@@ -1206,10 +1206,10 @@ class ClickMenu {
public function addMenuItems($menuItems, $newMenuItems, $position = '') {
if (is_array($newMenuItems)) {
if ($position) {
$posArr = GeneralUtility::trimExplode(',', $position, 1);
$posArr = GeneralUtility::trimExplode(',', $position, TRUE);
foreach ($posArr as $pos) {
list($place, $menuEntry) = GeneralUtility::trimExplode(':', $pos, 1);
list($place, $placeExtra) = GeneralUtility::trimExplode('-', $place, 1);
list($place, $menuEntry) = GeneralUtility::trimExplode(':', $pos, TRUE);
list($place, $placeExtra) = GeneralUtility::trimExplode('-', $place, TRUE);
// Bottom
$pointer = count($menuItems);
$found = FALSE;
......@@ -1337,7 +1337,7 @@ class ClickMenu {
$menuItems = $newMenuArray;
} else {
// Traverse all elements except those listed (just unsetting them):
$elements = GeneralUtility::trimExplode(',', $this->iParts[3], 1);
$elements = GeneralUtility::trimExplode(',', $this->iParts[3], TRUE);
foreach ($elements as $value) {
unset($menuItems[$value]);
}
......
......@@ -458,8 +458,8 @@ class NewContentElementController {
// Get TCEFORM from TSconfig of current page
$row = array('pid' => $this->id);
$TCEFORM_TSconfig = BackendUtility::getTCEFORM_TSconfig('tt_content', $row);
$removeItems = GeneralUtility::trimExplode(',', $TCEFORM_TSconfig['CType']['removeItems'], 1);
$keepItems = GeneralUtility::trimExplode(',', $TCEFORM_TSconfig['CType']['keepItems'], 1);
$removeItems = GeneralUtility::trimExplode(',', $TCEFORM_TSconfig['CType']['removeItems'], TRUE);
$keepItems = GeneralUtility::trimExplode(',', $TCEFORM_TSconfig['CType']['keepItems'], TRUE);
$headersUsed = array();
// Traverse wizard items:
foreach ($wizardItems as $key => $cfg) {
......
......@@ -734,7 +734,7 @@ class EditDocumentController {
foreach ($conf as $cKey => $cmd) {
if ($cmd == 'edit' || $cmd == 'new') {
// Get the ids:
$ids = GeneralUtility::trimExplode(',', $cKey, 1);
$ids = GeneralUtility::trimExplode(',', $cKey, TRUE);
// Traverse the ids:
foreach ($ids as $theUid) {
// Checking if the user has permissions? (Only working as a precaution,
......@@ -1258,7 +1258,7 @@ class EditDocumentController {
foreach ($conf as $cKey => $cmd) {
if ($cmd == 'edit') {
// Traverse the ids:
$ids = GeneralUtility::trimExplode(',', $cKey, 1);
$ids = GeneralUtility::trimExplode(',', $cKey, TRUE);
foreach ($ids as $idKey => $theUid) {
if (is_array($mapArray)) {
if ($mapArray[$table][$theUid]) {
......
......@@ -237,12 +237,12 @@ class NewRecordController {
if ($this->pageinfo['uid'] || $GLOBALS['BE_USER']->isAdmin()) {
// Acquiring TSconfig for this module/current page:
$this->web_list_modTSconfig = BackendUtility::getModTSconfig($this->pageinfo['uid'], 'mod.web_list');
$this->allowedNewTables = GeneralUtility::trimExplode(',', $this->web_list_modTSconfig['properties']['allowedNewTables'], 1);
$this->deniedNewTables = GeneralUtility::trimExplode(',', $this->web_list_modTSconfig['properties']['deniedNewTables'], 1);
$this->allowedNewTables = GeneralUtility::trimExplode(',', $this->web_list_modTSconfig['properties']['allowedNewTables'], TRUE);
$this->deniedNewTables = GeneralUtility::trimExplode(',', $this->web_list_modTSconfig['properties']['deniedNewTables'], TRUE);
// Acquiring TSconfig for this module/parent page:
$this->web_list_modTSconfig_pid = BackendUtility::getModTSconfig($this->pageinfo['pid'], 'mod.web_list');
$this->allowedNewTables_pid = GeneralUtility::trimExplode(',', $this->web_list_modTSconfig_pid['properties']['allowedNewTables'], 1);
$this->deniedNewTables_pid = GeneralUtility::trimExplode(',', $this->web_list_modTSconfig_pid['properties']['deniedNewTables'], 1);
$this->allowedNewTables_pid = GeneralUtility::trimExplode(',', $this->web_list_modTSconfig_pid['properties']['allowedNewTables'], TRUE);
$this->deniedNewTables_pid = GeneralUtility::trimExplode(',', $this->web_list_modTSconfig_pid['properties']['deniedNewTables'], TRUE);
// More init:
if (!$this->showNewRecLink('pages')) {
$this->newPagesInto = 0;
......
......@@ -177,7 +177,7 @@ class AddController {
$insertValue = $addEl . ',' . $curValueOfFlexform;
break;
}
$insertValue = implode(',', GeneralUtility::trimExplode(',', $insertValue, 1));
$insertValue = implode(',', GeneralUtility::trimExplode(',', $insertValue, TRUE));
$data[$this->P['table']][$this->P['uid']][$this->P['field']] = array();
$flexToolObj->setArrayValueByPath($this->P['flexFormPath'], $data[$this->P['table']][$this->P['uid']][$this->P['field']], $insertValue);
} else {
......@@ -192,7 +192,7 @@ class AddController {
$data[$this->P['table']][$this->P['uid']][$this->P['field']] = $addEl . ',' . $current[$this->P['field']];
break;
}
$data[$this->P['table']][$this->P['uid']][$this->P['field']] = implode(',', GeneralUtility::trimExplode(',', $data[$this->P['table']][$this->P['uid']][$this->P['field']], 1));
$data[$this->P['table']][$this->P['uid']][$this->P['field']] = implode(',', GeneralUtility::trimExplode(',', $data[$this->P['table']][$this->P['uid']][$this->P['field']], TRUE));
}
// Submit the data:
$tce->start($data, array());
......
......@@ -110,7 +110,7 @@ class DataPreprocessor {
}
if ($GLOBALS['TCA'][$table]) {
// For each ID value (integer) we
$ids = GeneralUtility::trimExplode(',', $idList, 1);
$ids = GeneralUtility::trimExplode(',', $idList, TRUE);
foreach ($ids as $id) {
// If ID is not blank:
if (strcmp($id, '')) {
......@@ -160,7 +160,7 @@ class DataPreprocessor {
$res = $GLOBALS['TYPO3_DB']->exec_SELECTquery('*', $table, 'uid=' . abs($id) . BackendUtility::deleteClause($table));
if ($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res)) {
// Gets the list of fields to copy from the previous record.
$fArr = GeneralUtility::trimExplode(',', $GLOBALS['TCA'][$table]['ctrl']['useColumnsForDefaultValues'], 1);
$fArr = GeneralUtility::trimExplode(',', $GLOBALS['TCA'][$table]['ctrl']['useColumnsForDefaultValues'], TRUE);
foreach ($fArr as $theF) {
if (isset($GLOBALS['TCA'][$table]['columns'][$theF]) && !isset($newRow[$theF])) {
$newRow[$theF] = $row[$theF];
......@@ -343,7 +343,7 @@ class DataPreprocessor {
}
}
} else {
$fileList = GeneralUtility::trimExplode(',', $data, 1);
$fileList = GeneralUtility::trimExplode(',', $data, TRUE);
foreach ($fileList as $value) {
if ($value) {
$dataAcc[] = rawurlencode($value) . '|' . rawurlencode($value);
......@@ -381,7 +381,7 @@ class DataPreprocessor {
public function renderRecord_selectProc($data, $fieldConfig, $TSconfig, $table, $row, $field) {
// Initialize:
// Current data set.
$elements = GeneralUtility::trimExplode(',', $data, 1);
$elements = GeneralUtility::trimExplode(',', $data, TRUE);
// New data set, ready for interface (list of values, rawurlencoded)
$dataAcc = array();
// For list selectors (multi-value):
......@@ -926,4 +926,4 @@ class DataPreprocessor {
}
?>
\ No newline at end of file
?>
......@@ -1431,7 +1431,7 @@ class InlineElement {
* @return array An array with uids
*/
protected function getRelatedRecordsUidArray($itemList) {
$itemArray = GeneralUtility::trimExplode(',', $itemList, 1);
$itemArray = GeneralUtility::trimExplode(',', $itemList, TRUE);
// Perform modification of the selected items array:
foreach ($itemArray as $key => &$value) {
$parts = explode('|', $value, 2);
......@@ -1512,7 +1512,7 @@ class InlineElement {
$selItems = $this->fObj->procItems($selItems, $PA['fieldTSConfig']['itemsProcFunc.'], $config, $table, $row, $field);
}
// Possibly remove some items:
$removeItems = GeneralUtility::trimExplode(',', $PA['fieldTSConfig']['removeItems'], 1);
$removeItems = GeneralUtility::trimExplode(',', $PA['fieldTSConfig']['removeItems'], TRUE);
foreach ($selItems as $tk => $p) {
// Checking languages and authMode:
$languageDeny = $tcaTableCtrl['languageField'] && !strcmp($tcaTableCtrl['languageField'], $field) && !$GLOBALS['BE_USER']->checkLanguageAccess($p[1]);
......@@ -2479,4 +2479,4 @@ class InlineElement {
}
?>
?>
\ No newline at end of file
......@@ -664,7 +664,7 @@ class FormEngine {
if ($GLOBALS['TCA'][$table]['types'][$typeNum]) {
$itemList = $GLOBALS['TCA'][$table]['types'][$typeNum]['showitem'];
if ($itemList) {
$fields = GeneralUtility::trimExplode(',', $itemList, 1);
$fields = GeneralUtility::trimExplode(',', $itemList, TRUE);
$excludeElements = ($this->excludeElements = $this->getExcludeElements($table, $row, $typeNum));
foreach ($fields as $fieldInfo) {
$parts = explode(';', $fieldInfo);
......@@ -732,7 +732,7 @@ class FormEngine {
// If such a list existed...
if ($itemList) {
// Explode the field list and possibly rearrange the order of the fields, if configured for
$fields = GeneralUtility::trimExplode(',', $itemList, 1);
$fields = GeneralUtility::trimExplode(',', $itemList, TRUE);
if ($this->fieldOrder) {
$fields = $this->rearrange($fields);
}
......@@ -918,7 +918,7 @@ class FormEngine {
}
$out = '';
$types_fieldConfig = BackendUtility::getTCAtypes($table, $row, 1);
$editFieldList = array_unique(GeneralUtility::trimExplode(',', $list, 1));
$editFieldList = array_unique(GeneralUtility::trimExplode(',', $list, TRUE));
foreach ($editFieldList as $theFieldC) {
list($theField, $palFields) = preg_split('/\\[|\\]/', $theFieldC);
$theField = trim($theField);
......@@ -932,7 +932,7 @@ class FormEngine {
$out .= $this->getDivider();
}
if ($palFields) {
$out .= $this->getPaletteFields($table, $row, '', '', implode(',', GeneralUtility::trimExplode('|', $palFields, 1)));
$out .= $this->getPaletteFields($table, $row, '', '', implode(',', GeneralUtility::trimExplode('|', $palFields, TRUE)));
}
}
return $out;
......@@ -1255,7 +1255,7 @@ class FormEngine {
$config = $PA['fieldConf']['config'];
$specConf = $this->getSpecConfFromString($PA['extra'], $PA['fieldConf']['defaultExtras']);
$size = MathUtility::forceIntegerInRange($config['size'] ? $config['size'] : 30, 5, $this->maxInputWidth);
$evalList = GeneralUtility::trimExplode(',', $config['eval'], 1);
$evalList = GeneralUtility::trimExplode(',', $config['eval'], TRUE);
$classAndStyleAttributes = $this->formWidthAsArray($size);
$fieldAppendix = '';
$item = '';
......@@ -1459,7 +1459,7 @@ function ' . $evalData . '(value) {
public function getSingleField_typeText($table, $field, $row, &$PA) {
// Init config:
$config = $PA['fieldConf']['config'];
$evalList = GeneralUtility::trimExplode(',', $config['eval'], 1);
$evalList = GeneralUtility::trimExplode(',', $config['eval'], TRUE);
if ($this->renderReadonly || $config['readOnly']) {
return $this->getSingleField_typeNone_render($config, $PA['itemFormElValue']);
}
......@@ -1559,7 +1559,7 @@ function ' . $evalData . '(value) {
} else {
$class = 'tceforms-textarea';
}
$evalList = GeneralUtility::trimExplode(',', $config['eval'], 1);
$evalList = GeneralUtility::trimExplode(',', $config['eval'], TRUE);
foreach ($evalList as $func) {
switch ($func) {
case 'required':
......@@ -1724,7 +1724,7 @@ function ' . $evalData . '(value) {
$selItems = $this->procItems($selItems, $PA['fieldTSConfig']['itemsProcFunc.'], $config, $table, $row, $field);
}
// Possibly remove some items:
$removeItems = GeneralUtility::trimExplode(',', $PA['fieldTSConfig']['removeItems'], 1);
$removeItems = GeneralUtility::trimExplode(',', $PA['fieldTSConfig']['removeItems'], TRUE);
foreach ($selItems as $tk => $p) {
// Checking languages and authMode:
$languageDeny = $GLOBALS['TCA'][$table]['ctrl']['languageField'] && !strcmp($GLOBALS['TCA'][$table]['ctrl']['languageField'], $field) && !$GLOBALS['BE_USER']->checkLanguageAccess($p[1]);
......@@ -2195,9 +2195,9 @@ function ' . $evalData . '(value) {
// Register the required number of elements:
$this->registerRequiredProperty('range', $PA['itemFormElName'], array($minitems, $maxitems, 'imgName' => $table . '_' . $row['uid'] . '_' . $field));
// Get "removeItems":
$removeItems = GeneralUtility::trimExplode(',', $PA['fieldTSConfig']['removeItems'], 1);
$removeItems = GeneralUtility::trimExplode(',', $PA['fieldTSConfig']['removeItems'], TRUE);
// Get the array with selected items:
$itemArray = GeneralUtility::trimExplode(',', $PA['itemFormElValue'], 1);
$itemArray = GeneralUtility::trimExplode(',', $PA['itemFormElValue'], TRUE);
// Possibly filter some items:
$keepItemsFunc = create_function('$value', '$parts=explode(\'|\',$value,2); return rawurldecode($parts[0]);');
$itemArray = GeneralUtility::keepItemsInArray($itemArray, $PA['fieldTSConfig']['keepItems'], $keepItemsFunc);
......@@ -2438,7 +2438,7 @@ function ' . $evalData . '(value) {
case 'folder':
// If the element is of the internal type "folder":
// Array of folder items:
$itemArray = GeneralUtility::trimExplode(',', $PA['itemFormElValue'], 1);
$itemArray = GeneralUtility::trimExplode(',', $PA['itemFormElValue'], TRUE);
// Creating the element:
$params = array(
'size' => $size,
......@@ -2472,7 +2472,7 @@ function ' . $evalData . '(value) {
$itemArray = array();
$imgs = array();
// Thumbnails:
$temp_itemArray = GeneralUtility::trimExplode(',', $PA['itemFormElValue'], 1);
$temp_itemArray = GeneralUtility::trimExplode(',', $PA['itemFormElValue'], TRUE);
foreach ($temp_itemArray as $dbRead) {
$recordParts = explode('|', $dbRead);
list($this_table, $this_uid) = BackendUtility::splitTable_Uid($recordParts[0]);
......@@ -3249,7 +3249,7 @@ function ' . $evalData . '(value) {
* @todo Define visibility
*/
public function rearrange($fields) {
$fO = array_flip(GeneralUtility::trimExplode(',', $this->fieldOrder, 1));
$fO = array_flip(GeneralUtility::trimExplode(',', $this->fieldOrder, TRUE));
$newFields = array();
foreach ($fields as $cc => $content) {
$cP = GeneralUtility::trimExplode(';', $content);
......@@ -3282,7 +3282,7 @@ function ' . $evalData . '(value) {
if ($GLOBALS['TCA'][$table]['types'][$typeNum]['subtype_value_field']) {
$sTfield = $GLOBALS['TCA'][$table]['types'][$typeNum]['subtype_value_field'];
if (trim($GLOBALS['TCA'][$table]['types'][$typeNum]['subtypes_excludelist'][$row[$sTfield]])) {
$excludeElements = GeneralUtility::trimExplode(',', $GLOBALS['TCA'][$table]['types'][$typeNum]['subtypes_excludelist'][$row[$sTfield]], 1);
$excludeElements = GeneralUtility::trimExplode(',', $GLOBALS['TCA'][$table]['types'][$typeNum]['subtypes_excludelist'][$row[$sTfield]], TRUE);
}
}
// If a bitmask-value field has been configured, then find possible fields to exclude based on that:
......@@ -3295,7 +3295,7 @@ function ' . $evalData . '(value) {
if (MathUtility::canBeInterpretedAsInteger($bit)) {
$bit = MathUtility::forceIntegerInRange($bit, 0, 30);
if (substr($bitKey, 0, 1) == '-' && !($sTValue & pow(2, $bit)) || substr($bitKey, 0, 1) == '+' && $sTValue & pow(2, $bit)) {
$excludeElements = array_merge($excludeElements, GeneralUtility::trimExplode(',', $eList, 1));
$excludeElements = array_merge($excludeElements, GeneralUtility::trimExplode(',', $eList, TRUE));
}
}
}
......@@ -3322,7 +3322,7 @@ function ' . $evalData . '(value) {
if ($GLOBALS['TCA'][$table]['types'][$typeNum]['subtype_value_field']) {
$sTfield = $GLOBALS['TCA'][$table]['types'][$typeNum]['subtype_value_field'];
if (trim($GLOBALS['TCA'][$table]['types'][$typeNum]['subtypes_addlist'][$row[$sTfield]])) {
$addElements = GeneralUtility::trimExplode(',', $GLOBALS['TCA'][$table]['types'][$typeNum]['subtypes_addlist'][$row[$sTfield]], 1);
$addElements = GeneralUtility::trimExplode(',', $GLOBALS['TCA'][$table]['types'][$typeNum]['subtypes_addlist'][$row[$sTfield]], TRUE);
}
}
// Return the return
......@@ -3464,7 +3464,7 @@ function ' . $evalData . '(value) {
if ($GLOBALS['TCA'][$table] && (is_array($GLOBALS['TCA'][$table]['palettes'][$palette]) || $itemList)) {
$itemList = $itemList ? $itemList : $GLOBALS['TCA'][$table]['palettes'][$palette]['showitem'];
if ($itemList) {
$fields = GeneralUtility::trimExplode(',', $itemList, 1);
$fields = GeneralUtility::trimExplode(',', $itemList, TRUE);
foreach ($fields as $info) {
$fieldParts = GeneralUtility::trimExplode(';', $info);
$theField = $fieldParts[0];
......@@ -3849,7 +3849,7 @@ function ' . $evalData . '(value) {
case 'file':
$elFromTable = $this->clipObj->elFromTable('_FILE');
$allowedExts = GeneralUtility::trimExplode(',', $allowed, 1);
$allowedExts = GeneralUtility::trimExplode(',', $allowed, TRUE);
// If there are a set of allowed extensions, filter the content:
if ($allowedExts) {
foreach ($elFromTable as $elValue) {
......@@ -3865,7 +3865,7 @@ function ' . $evalData . '(value) {
}
break;
case 'db':
$allowedTables = GeneralUtility::trimExplode(',', $allowed, 1);
$allowedTables = GeneralUtility::trimExplode(',', $allowed, TRUE);
// All tables allowed for relation:
if (!strcmp(trim($allowedTables[0]), '*')) {
$output = $this->clipObj->elFromTable('');
......@@ -4234,7 +4234,7 @@ function ' . $evalData . '(value) {
*/
public function extractValuesOnlyFromValueLabelList($itemFormElValue) {
// Get values of selected items:
$itemArray = GeneralUtility::trimExplode(',', $itemFormElValue, 1);
$itemArray = GeneralUtility::trimExplode(',', $itemFormElValue, TRUE);
foreach ($itemArray as $tk => $tv) {
$tvP = explode('|', $tv, 2);
$tvP[0] = rawurldecode($tvP[0]);
......@@ -4854,7 +4854,7 @@ function ' . $evalData . '(value) {
if (is_array($row)) {
// Prepare the icon if available:
if ($iField && $iPath && $row[$iField]) {
$iParts = GeneralUtility::trimExplode(',', $row[$iField], 1);
$iParts = GeneralUtility::trimExplode(',', $row[$iField], TRUE);
$icon = '../' . $iPath . '/' . trim($iParts[0]);
} elseif (GeneralUtility::inList('singlebox,checkbox', $fieldValue['config']['renderMode'])) {
$icon = IconUtility::mapRecordTypeToSpriteIconName($f_table, $row);
......@@ -6131,7 +6131,7 @@ function ' . $evalData . '(value) {
$show_thumbs = TRUE;
$table = 'tt_content';
// Making the array of file items:
$itemArray = GeneralUtility::trimExplode(',', $value, 1);
$itemArray = GeneralUtility::trimExplode(',', $value, TRUE);
// Showing thumbnails:
$thumbsnail = '';
if ($show_thumbs) {
......
......@@ -173,7 +173,7 @@ class ModuleSettings {
* @todo Define visibility
*/
public function setStoreList($storeList) {
$this->storeList = is_array($storeList) ? $storeList : GeneralUtility::trimExplode(',', $storeList, 1);
$this->storeList = is_array($storeList) ? $storeList : GeneralUtility::trimExplode(',', $storeList, TRUE);
if ($this->writeDevLog) {
GeneralUtility::devLog('Store list:' . implode(',', $this->storeList), 'TYPO3\\CMS\\Backend\\ModuleSettings', 0);
}
......@@ -187,7 +187,7 @@ class ModuleSettings {
* @todo Define visibility
*/
public function addToStoreList($storeList) {
$storeList = is_array($storeList) ? $storeList : GeneralUtility::trimExplode(',', $storeList, 1);
$storeList = is_array($storeList) ? $storeList : GeneralUtility::trimExplode(',', $storeList, TRUE);
$this->storeList = array_merge($this->storeList, $storeList);
if ($this->writeDevLog) {
GeneralUtility::devLog('Store list:' . implode(',', $this->storeList), 'TYPO3\\CMS\\Backend\\ModuleSettings', 0);
......@@ -381,7 +381,7 @@ class ModuleSettings {
* @todo Define visibility
*/
public function getStoreControl($showElements = 'load,remove,save', $useOwnForm = TRUE) {
$showElements = GeneralUtility::trimExplode(',', $showElements, 1);
$showElements = GeneralUtility::trimExplode(',', $showElements, TRUE);
$this->initStorage();
// Preset selector
$opt = array();
......
......@@ -339,7 +339,7 @@ class PagePositionMap {
* @todo Define visibility
*/
public function insertQuadLines($codes, $allBlank = FALSE) {
$codeA = GeneralUtility::trimExplode(',', $codes . ',line', 1);
$codeA = GeneralUtility::trimExplode(',', $codes . ',line', TRUE);
$lines = array();
foreach ($codeA as $code) {
if ($code == 'blank' || $allBlank) {
......@@ -370,7 +370,7 @@ class PagePositionMap {
public function printContentElementColumns($pid, $moveUid, $colPosList, $showHidden, $R_URI) {
$this->R_URI = $R_URI;
$this->moveUid = $moveUid;
$colPosArray = GeneralUtility::trimExplode(',', $colPosList, 1);
$colPosArray = GeneralUtility::trimExplode(',', $colPosList, TRUE);
$lines = array();
foreach ($colPosArray as $kk => $vv) {
$res = $GLOBALS['TYPO3_DB']->exec_SELECTquery('*', 'tt_content', 'pid=' . intval($pid) . ($showHidden ? '' : BackendUtility::BEenableFields('tt_content')) . ' AND colPos=' . intval($vv) . (strcmp($this->cur_sys_language, '') ? ' AND sys_language_uid=' . intval($this->cur_sys_language) : '') . BackendUtility::deleteClause('tt_content') . BackendUtility::versioningPlaceholderClause('tt_content'), '', 'sorting');
......@@ -573,4 +573,4 @@ class PagePositionMap {
}
?>
\ No newline at end of file
?>
......@@ -815,14 +815,14 @@ class BackendUtility {
*/
static public function getSpecConfParts($str, $defaultExtras) {
// Add defaultExtras:
$specConfParts = GeneralUtility::trimExplode(':', $defaultExtras . ':' . $str, 1);
$specConfParts = GeneralUtility::trimExplode(':', $defaultExtras . ':' . $str, TRUE);
$reg = array();
if (count($specConfParts)) {
foreach ($specConfParts as $k2 => $v2) {
unset($specConfParts[$k2]);
if (preg_match('/(.*)\\[(.*)\\]/', $v2, $reg)) {
$specConfParts[trim($reg[1])] = array(
'parameters' => GeneralUtility::trimExplode('|', $reg[2], 1)
'parameters' => GeneralUtility::trimExplode('|', $reg[2], TRUE)
);
} else {
$specConfParts[trim($v2)] = 1;
......@@ -1882,7 +1882,7 @@ class BackendUtility {
// No userFunc: Build label
$t = self::getProcessedValue($table, $GLOBALS['TCA'][$table]['ctrl']['label'], $row[$GLOBALS['TCA'][$table]['ctrl']['label']], 0, 0, FALSE, $row['uid'], $forceResult);
if ($GLOBALS['TCA'][$table]['ctrl']['label_alt'] && ($GLOBALS['TCA'][$table]['ctrl']['label_alt_force'] || !strcmp($t, ''))) {
$altFields = GeneralUtility::trimExplode(',', $GLOBALS['TCA'][$table]['ctrl']['label_alt'], 1);
$altFields = GeneralUtility::trimExplode(',', $GLOBALS['TCA'][$table]['ctrl']['label_alt'], TRUE);
$tA = array();
if (!empty($t)) {
$tA[] = $t;
......@@ -2000,7 +2000,7 @@ class BackendUtility {
$MMfield = $theColConf['foreign_table'] . '.uid';
} else {
$MMfields = array($theColConf['foreign_table'] . '.' . $GLOBALS['TCA'][$theColConf['foreign_table']]['ctrl']['label']);
foreach (GeneralUtility::trimExplode(',', $GLOBALS['TCA'][$theColConf['foreign_table']]['ctrl']['label_alt'], 1) as $f) {
foreach (GeneralUtility::trimExplode(',', $GLOBALS['TCA'][$theColConf['foreign_table']]['ctrl']['label_alt'], TRUE) as $f) {
$MMfields[] = $theColConf['foreign_table'] . '.' . $f;
}
$MMfield = join(',', $MMfields);
......@@ -2032,7 +2032,7 @@ class BackendUtility {
if ($noRecordLookup) {
$l = $value;
} else {
$rParts = GeneralUtility::trimExplode(',', $value, 1);
$rParts = GeneralUtility::trimExplode(',', $value, TRUE);
$lA = array();
foreach ($rParts as $rVal) {
$rVal = intval($rVal);
......@@ -2222,7 +2222,7 @@ class BackendUtility {
$fields[] = $prefix . $GLOBALS['TCA'][$table]['ctrl']['label'];
}
if ($GLOBALS['TCA'][$table]['ctrl']['label_alt']) {
$secondFields = GeneralUtility::trimExplode(',', $GLOBALS['TCA'][$table]['ctrl']['label_alt'], 1);
$secondFields = GeneralUtility::trimExplode(',', $GLOBALS['TCA'][$table]['ctrl']['label_alt'], TRUE);
foreach ($secondFields as $fieldN) {
$fields[] = $prefix . $fieldN;
}
......@@ -3372,12 +3372,12 @@ class BackendUtility {
return FALSE;
}
// Otherwise parse the list:
$keyList = GeneralUtility::trimExplode(',', $parserList, 1);
$keyList = GeneralUtility::trimExplode(',', $parserList, TRUE);
$output = array();
foreach ($keyList as $val) {
$reg = array();
if (preg_match('/^([[:alnum:]_-]+)\\[(.*)\\]$/', $val, $reg)) {
$output[$reg[1]] = GeneralUtility::trimExplode(';', $reg[2], 1);
$output[$reg[1]] = GeneralUtility::trimExplode(';', $reg[2], TRUE);
} else {
$output[$val] = '';
}
......@@ -3396,7 +3396,7 @@ class BackendUtility {
foreach ($GLOBALS['TBE_MODULES'] as $mkey => $list) {
$loaded[$mkey] = 1;
if (!is_array($list) && trim($list)) {
$subList = GeneralUtility::trimExplode(',', $list, 1);
$subList = GeneralUtility::trimExplode(',', $list, TRUE);
foreach ($subList as $skey) {
$loaded[$mkey . '_' . $skey] = 1;
}
......
......@@ -87,7 +87,7 @@ class BackendLayoutView {
if (isset($tcaConfig['itemsProcFunc']) && $tcaConfig['itemsProcFunc']) {
$tcaItems = $this->addColPosListLayoutItems($id, $tcaItems);
}
foreach (GeneralUtility::trimExplode(',', $tsConfig['properties']['removeItems'], 1) as $removeId) {
foreach (GeneralUtility::trimExplode(',', $tsConfig['properties']['removeItems'], TRUE) as $removeId) {
foreach ($tcaItems as $key => $item) {
if ($item[1] == $removeId) {
unset($tcaItems[$key]);
......
......@@ -1533,7 +1533,7 @@ class PageLayoutView extends \TYPO3\CMS\Recordlist\RecordList\AbstractDatabaseRe
}
// Remove disabled languages
$modSharedTSconfig = BackendUtility::getModTSconfig($id, 'mod.SHARED');
$disableLanguages = isset($modSharedTSconfig['properties']['disableLanguages']) ? GeneralUtility::trimExplode(',', $modSharedTSconfig['properties']['disableLanguages'], 1) : array();
$disableLanguages = isset($modSharedTSconfig['properties']['disableLanguages']) ? GeneralUtility::trimExplode(',', $modSharedTSconfig['properties']['disableLanguages'], TRUE) : array();
if (count($langSelItems) && count($disableLanguages)) {
foreach ($disableLanguages as $language) {
if ($language != 0 && isset($langSelItems[$language])) {
......
......@@ -1162,7 +1162,7 @@ class CharsetConverter {
$this->parsedCharsets[$charset] = unserialize(GeneralUtility::getUrl($cacheFile));
} else {
// Parse conversion table into lines:
$lines = GeneralUtility::trimExplode(LF, GeneralUtility::getUrl($charsetConvTableFile), 1);
$lines = GeneralUtility::trimExplode(LF, GeneralUtility::getUrl($charsetConvTableFile), TRUE);
// Initialize the internal variable holding the conv. table:
$this->parsedCharsets[$charset] = array('local' => array(), 'utf8' => array());
// traverse the lines:
......
......@@ -168,7 +168,7 @@ class CommandLineController {
$allOptions = array();
foreach ($this->cli_options as $cfg) {
$allOptions[] = $cfg[0];
$argSplit = \TYPO3\CMS\Core\Utility\GeneralUtility::trimExplode(' ', $cfg[0], 1);
$argSplit = \TYPO3\CMS\Core\Utility\GeneralUtility::trimExplode(' ', $cfg[0], TRUE);
if (isset($cli_args_copy[$argSplit[0]])) {
foreach ($argSplit as $i => $v) {
$ii = $i;
......
......@@ -279,7 +279,7 @@ class QueryGenerator {
$this->name = $name;
$this->table = $table;
$this->fieldList = $fieldList ? $fieldList : $this->makeFieldList();
$fieldArr = \TYPO3\CMS\Core\Utility\GeneralUtility::trimExplode(',', $this->fieldList, 1);
$fieldArr = \TYPO3\CMS\Core\Utility\GeneralUtility::trimExplode(',', $this->fieldList, TRUE);
foreach ($fieldArr as $fN) {
$fC = $GLOBALS['TCA'][$this->table]['columns'][$fN];
$this->fields[$fN] = $fC['config'];
......@@ -409,7 +409,7 @@ class QueryGenerator {
* @todo Define visibility
*/
public function setAndCleanUpExternalLists($name, $list, $force = '') {
$fields = array_unique(\TYPO3\CMS\Core\Utility\GeneralUtility::trimExplode(',', $list . ',' . $force, 1));
$fields = array_unique(\TYPO3\CMS\Core\Utility\GeneralUtility::trimExplode(',', $list . ',' . $force, TRUE));
$reList = array();
foreach ($fields as $fN) {
if ($this->fields[$fN]) {
......
......@@ -202,7 +202,7 @@ class RelationHandler {
$tablelist = implode(',', array_keys($GLOBALS['TCA']));
}
// The tables are traversed and internal arrays are initialized:
$tempTableArray = \TYPO3\CMS\Core\Utility\GeneralUtility::trimExplode(',', $tablelist, 1);
$tempTableArray = \TYPO3\CMS\Core\Utility\GeneralUtility::trimExplode(',', $tablelist, TRUE);
foreach ($tempTableArray as $key => $val) {
$tName = trim($val);
$this->tableArray[$tName] = array();
......
......@@ -569,7 +569,7 @@ class SoftReferenceIndex {
public function getTypoLinkParts($typolinkValue) {
$finalTagParts = array();
// Split by space into link / target / class
list($link_param, $browserTarget, $cssClass) = GeneralUtility::trimExplode(' ', $typolinkValue, 1);
list($link_param, $browserTarget, $cssClass) = GeneralUtility::trimExplode(' ', $typolinkValue, TRUE);