[TASK] Use real boolean value for trimExplode third param 42/22542/3
authorWouter Wolters <typo3@wouterwolters.nl>
Wed, 24 Jul 2013 17:11:30 +0000 (19:11 +0200)
committerStefan Neufeind <typo3.neufeind@speedpartner.de>
Fri, 26 Jul 2013 10:14:02 +0000 (12:14 +0200)
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
66 files changed:
typo3/sysext/backend/Classes/ClickMenu/ClickMenu.php
typo3/sysext/backend/Classes/Controller/ContentElement/NewContentElementController.php
typo3/sysext/backend/Classes/Controller/EditDocumentController.php
typo3/sysext/backend/Classes/Controller/NewRecordController.php
typo3/sysext/backend/Classes/Controller/Wizard/AddController.php
typo3/sysext/backend/Classes/Form/DataPreprocessor.php
typo3/sysext/backend/Classes/Form/Element/InlineElement.php
typo3/sysext/backend/Classes/Form/FormEngine.php
typo3/sysext/backend/Classes/Module/ModuleSettings.php
typo3/sysext/backend/Classes/Tree/View/PagePositionMap.php
typo3/sysext/backend/Classes/Utility/BackendUtility.php
typo3/sysext/backend/Classes/View/BackendLayoutView.php
typo3/sysext/backend/Classes/View/PageLayoutView.php
typo3/sysext/core/Classes/Charset/CharsetConverter.php
typo3/sysext/core/Classes/Controller/CommandLineController.php
typo3/sysext/core/Classes/DataHandling/DataHandler.php
typo3/sysext/core/Classes/Database/QueryGenerator.php
typo3/sysext/core/Classes/Database/RelationHandler.php
typo3/sysext/core/Classes/Database/SoftReferenceIndex.php
typo3/sysext/core/Classes/FrontendEditing/FrontendEditingController.php
typo3/sysext/core/Classes/Html/HtmlParser.php
typo3/sysext/core/Classes/Html/RteHtmlParser.php
typo3/sysext/core/Classes/Imaging/GraphicalFunctions.php
typo3/sysext/core/Classes/Service/AbstractService.php
typo3/sysext/core/Classes/TimeTracker/TimeTracker.php
typo3/sysext/core/Classes/TypoScript/TemplateService.php
typo3/sysext/core/Classes/Utility/CommandUtility.php
typo3/sysext/core/Classes/Utility/DiffUtility.php
typo3/sysext/core/Classes/Utility/ExtensionManagementUtility.php
typo3/sysext/core/Classes/Utility/GeneralUtility.php
typo3/sysext/cshmanual/Classes/Controller/HelpModuleController.php
typo3/sysext/css_styled_content/Classes/Controller/CssStyledContentController.php
typo3/sysext/extbase/Classes/Persistence/Generic/Storage/Typo3DbBackend.php
typo3/sysext/frontend/Classes/ContentObject/ContentObjectRenderer.php
typo3/sysext/frontend/Classes/Controller/TranslationStatusController.php
typo3/sysext/frontend/Classes/Controller/TypoScriptFrontendController.php
typo3/sysext/frontend/Classes/Page/PageGenerator.php
typo3/sysext/frontend/Classes/Plugin/AbstractPlugin.php
typo3/sysext/impexp/Classes/ImportExport.php
typo3/sysext/indexed_search/Classes/Controller/IndexedPagesController.php
typo3/sysext/indexed_search/Classes/Controller/SearchFormController.php
typo3/sysext/indexed_search/Classes/FileContentParser.php
typo3/sysext/indexed_search/Classes/Hook/CrawlerHook.php
typo3/sysext/indexed_search/Classes/Indexer.php
typo3/sysext/install/Classes/Service/SqlSchemaMigrationService.php
typo3/sysext/linkvalidator/Classes/Report/LinkValidatorReport.php
typo3/sysext/linkvalidator/Classes/Task/ValidatorTask.php
typo3/sysext/lowlevel/Classes/LostFilesCommand.php
typo3/sysext/recordlist/Classes/Browser/ElementBrowser.php
typo3/sysext/recordlist/Classes/RecordList.php
typo3/sysext/recordlist/Classes/RecordList/DatabaseRecordList.php
typo3/sysext/rtehtmlarea/Classes/BrowseLinks.php
typo3/sysext/rtehtmlarea/Classes/Controller/SpellCheckingController.php
typo3/sysext/rtehtmlarea/Classes/Extension/Acronym.php
typo3/sysext/rtehtmlarea/Classes/Extension/BlockElements.php
typo3/sysext/rtehtmlarea/Classes/Extension/ContextMenu.php
typo3/sysext/rtehtmlarea/Classes/Extension/CopyPaste.php
typo3/sysext/rtehtmlarea/Classes/Extension/DefinitionList.php
typo3/sysext/rtehtmlarea/Classes/Extension/InlineElements.php
typo3/sysext/rtehtmlarea/Classes/Extension/SelectFont.php
typo3/sysext/rtehtmlarea/Classes/RteHtmlAreaApi.php
typo3/sysext/rtehtmlarea/Classes/RteHtmlAreaBase.php
typo3/sysext/rtehtmlarea/Classes/SelectImage.php
typo3/sysext/sys_action/Classes/ActionTask.php
typo3/sysext/version/Classes/Hook/DataHandlerHook.php
typo3/sysext/workspaces/Classes/ExtDirect/ExtDirectServer.php

index 4853486..c13dba3 100644 (file)
@@ -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]);
                                }
index c37e04a..1acbab9 100644 (file)
@@ -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) {
index 9619f8a..7aa7d6e 100644 (file)
@@ -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]) {
index f465c4c..4b39af9 100644 (file)
@@ -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;
index f6b632b..017a8fa 100644 (file)
@@ -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());
index 5fe037d..1987dd2 100644 (file)
@@ -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
+?>
index 6190730..1a690fd 100644 (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
index ab49180..c9f25b9 100644 (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) {
index 165c516..3e1d82c 100644 (file)
@@ -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();
index 8e3f80a..df16eb5 100644 (file)
@@ -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
+?>
index b211e28..ea8e622 100644 (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;
                                }
index 6e30360..711195c 100644 (file)
@@ -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]);
index 2da3327..e1b9255 100644 (file)
@@ -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])) {
index 38ed998..86b14bf 100644 (file)
@@ -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:
index 1397d10..fe79b04 100644 (file)
@@ -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;
index 1b6bf94..e85370a 100644 (file)
@@ -721,7 +721,7 @@ class DataHandler {
                                if (isset($this->datamap[$table])) {
                                        foreach ($uid_array as $id => $uidList) {
                                                if (isset($this->datamap[$table][$id])) {
-                                                       $theIdsInArray = GeneralUtility::trimExplode(',', $uidList, 1);
+                                                       $theIdsInArray = GeneralUtility::trimExplode(',', $uidList, TRUE);
                                                        foreach ($theIdsInArray as $copyToUid) {
                                                                $this->datamap[$table][$copyToUid] = $this->datamap[$table][$id];
                                                        }
@@ -1257,7 +1257,7 @@ class DataHandler {
                                $shadowCols .= ',' . $GLOBALS['TCA'][$table]['ctrl']['transOrigPointerField'];
                                $shadowCols .= ',' . $GLOBALS['TCA'][$table]['ctrl']['type'];
                                $shadowCols .= ',' . $GLOBALS['TCA'][$table]['ctrl']['label'];
-                               $shadowColumns = array_unique(\TYPO3\CMS\Core\Utility\GeneralUtility::trimExplode(',', $shadowCols, 1));
+                               $shadowColumns = array_unique(GeneralUtility::trimExplode(',', $shadowCols, TRUE));
                                foreach ($shadowColumns as $fieldName) {
                                        if (strcmp($justStoredRecord[$fieldName], $liveRec[$fieldName]) && isset($GLOBALS['TCA'][$table]['columns'][$fieldName]) && $fieldName !== 'uid' && $fieldName !== 'pid') {
                                                $newRecord[$fieldName] = $justStoredRecord[$fieldName];
@@ -1328,7 +1328,7 @@ class DataHandler {
                                        // Stripping slashes - will probably be removed the day $this->stripslashes_values is removed as an option...
                                        if ($this->stripslashes_values) {
                                                if (is_array($fieldValue)) {
-                                                       \TYPO3\CMS\Core\Utility\GeneralUtility::stripSlashesOnArray($fieldValue);
+                                                       GeneralUtility::stripSlashesOnArray($fieldValue);
                                                } else {
                                                        $fieldValue = stripslashes($fieldValue);
                                                }
@@ -1457,7 +1457,7 @@ class DataHandler {
                                        // Must replace the marker if present in content!
                                        $insertContent = str_replace($eFileMarker, '', $mixedRec[$eFile['contentField']]);
                                        $SW_fileNewContent = $parseHTML->substituteSubpart($SW_fileContent, $eFileMarker, LF . $insertContent . LF, 1, 1);
-                                       \TYPO3\CMS\Core\Utility\GeneralUtility::writeFile($eFile['editFile'], $SW_fileNewContent);
+                                       GeneralUtility::writeFile($eFile['editFile'], $SW_fileNewContent);
                                        // Write status:
                                        if (!strstr($id, 'NEW') && $eFile['statusField']) {
                                                $GLOBALS['TYPO3_DB']->exec_UPDATEquery($table, 'uid=' . intval($id), array(
@@ -1606,7 +1606,7 @@ class DataHandler {
         * @todo Define visibility
         */
        public function checkValue_text($res, $value, $tcaFieldConf, $PP, $field = '') {
-               $evalCodesArray = GeneralUtility::trimExplode(',', $tcaFieldConf['eval'], 1);
+               $evalCodesArray = GeneralUtility::trimExplode(',', $tcaFieldConf['eval'], TRUE);
                $res = $this->checkValue_text_Eval($value, $evalCodesArray, $tcaFieldConf['is_in']);
                return $res;
        }
@@ -1646,7 +1646,7 @@ class DataHandler {
                        }
                }
                // Process evaluation settings:
-               $evalCodesArray = GeneralUtility::trimExplode(',', $tcaFieldConf['eval'], 1);
+               $evalCodesArray = GeneralUtility::trimExplode(',', $tcaFieldConf['eval'], TRUE);
                $res = $this->checkValue_input_Eval($value, $evalCodesArray, $tcaFieldConf['is_in']);
                // Process UNIQUE settings:
                // Field is NOT set for flexForms - which also means that uniqueInPid and unique is NOT available for flexForm fields! Also getUnique should not be done for versioning and if PID is -1 ($realPid<0) then versioning is happening...
@@ -1922,14 +1922,14 @@ class DataHandler {
                                                        }
                                                }
                                        } else {
-                                               $theFileValues = GeneralUtility::trimExplode(',', $curValue, 1);
+                                               $theFileValues = GeneralUtility::trimExplode(',', $curValue, TRUE);
                                        }
                                        $currentFilesForHistory = implode(',', $theFileValues);
                                        // DELETE files: If existing files were found, traverse those and register files for deletion which has been removed:
                                        if (count($theFileValues)) {
                                                // Traverse the input values and for all input values which match an EXISTING value, remove the existing from $theFileValues array (this will result in an array of all the existing files which should be deleted!)
                                                foreach ($valueArray as $key => $theFile) {
-                                                       if ($theFile && !strstr(\TYPO3\CMS\Core\Utility\GeneralUtility::fixWindowsFilePath($theFile), '/')) {
+                                                       if ($theFile && !strstr(GeneralUtility::fixWindowsFilePath($theFile), '/')) {
                                                                $theFileValues = GeneralUtility::removeArrayEntryByValue($theFileValues, $theFile);
                                                        }
                                                }
@@ -1958,7 +1958,7 @@ class DataHandler {
                                        }
                                        // NEW FILES? If the value contains '/' it indicates, that the file
                                        // is new and should be added to the uploadsdir (whether its absolute or relative does not matter here)
-                                       if (strstr(\TYPO3\CMS\Core\Utility\GeneralUtility::fixWindowsFilePath($theFile), '/')) {
+                                       if (strstr(GeneralUtility::fixWindowsFilePath($theFile), '/')) {
                                                // Check various things before copying file:
                                                // File and destination must exist
                                                if (@is_dir($dest) && (@is_file($theFile) || @is_uploaded_file($theFile))) {
@@ -1978,7 +1978,7 @@ class DataHandler {
                                                                        $theDestFile = $this->fileFunc->getUniqueName($this->fileFunc->cleanFileName($fI['file']), $dest);
                                                                        // If we have a unique destination filename, then write the file:
                                                                        if ($theDestFile) {
-                                                                               \TYPO3\CMS\Core\Utility\GeneralUtility::upload_copy_move($theFile, $theDestFile);
+                                                                               GeneralUtility::upload_copy_move($theFile, $theDestFile);
                                                                                // Hook for post-processing the upload action
                                                                                if (is_array($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_tcemain.php']['processUpload'])) {
                                                                                        foreach ($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_tcemain.php']['processUpload'] as $classRef) {
@@ -2001,7 +2001,7 @@ class DataHandler {
                                                                        $this->log($table, $id, 5, 0, 1, 'File extension \'%s\' not allowed. (%s)', 12, array($fI['fileext'], $recFID), $propArr['event_pid']);
                                                                }
                                                        } else {
-                                                               $this->log($table, $id, 5, 0, 1, 'Filesize (%s) of file \'%s\' exceeds limit (%s). (%s)', 13, array(\TYPO3\CMS\Core\Utility\GeneralUtility::formatSize($fileSize), $theFile, GeneralUtility::formatSize($maxSize * 1024), $recFID), $propArr['event_pid']);
+                                                               $this->log($table, $id, 5, 0, 1, 'Filesize (%s) of file \'%s\' exceeds limit (%s). (%s)', 13, array(GeneralUtility::formatSize($fileSize), $theFile, GeneralUtility::formatSize($maxSize * 1024), $recFID), $propArr['event_pid']);
                                                        }
                                                } else {
                                                        $this->log($table, $id, 5, 0, 1, 'The destination (%s) or the source file (%s) does not exist. (%s)', 14, array($dest, $theFile, $recFID), $propArr['event_pid']);
@@ -2065,7 +2065,7 @@ class DataHandler {
                                                        } elseif (@is_file($theFile)) {
                                                                $dest = dirname(PATH_site . $this->alternativeFilePath[$theFile]);
                                                                if (!@is_dir($dest)) {
-                                                                       \TYPO3\CMS\Core\Utility\GeneralUtility::mkdir_deep(PATH_site, dirname($this->alternativeFilePath[$theFile]) . '/');
+                                                                       GeneralUtility::mkdir_deep(PATH_site, dirname($this->alternativeFilePath[$theFile]) . '/');
                                                                }
                                                                // Init:
                                                                $maxSize = intval($tcaFieldConf['max_size']);
@@ -2083,7 +2083,7 @@ class DataHandler {
                                                                                $theDestFile = PATH_site . $this->alternativeFilePath[$theFile];
                                                                                // Write the file:
                                                                                if ($theDestFile) {
-                                                                                       \TYPO3\CMS\Core\Utility\GeneralUtility::upload_copy_move($theFile, $theDestFile);
+                                                                                       GeneralUtility::upload_copy_move($theFile, $theDestFile);
                                                                                        $this->copiedFileMap[$theFile] = $theDestFile;
                                                                                        clearstatcache();
                                                                                        if (!@is_file($theDestFile)) {
@@ -2096,7 +2096,7 @@ class DataHandler {
                                                                                $this->log($table, $id, 5, 0, 1, 'File extension \'%s\' not allowed. (%s)', 12, array($fI['fileext'], $recFID), $propArr['event_pid']);
                                                                        }
                                                                } else {
-                                                                       $this->log($table, $id, 5, 0, 1, 'Filesize (%s) of file \'%s\' exceeds limit (%s). (%s)', 13, array(\TYPO3\CMS\Core\Utility\GeneralUtility::formatSize($fileSize), $theFile, GeneralUtility::formatSize($maxSize * 1024), $recFID), $propArr['event_pid']);
+                                                                       $this->log($table, $id, 5, 0, 1, 'Filesize (%s) of file \'%s\' exceeds limit (%s). (%s)', 13, array(GeneralUtility::formatSize($fileSize), $theFile, GeneralUtility::formatSize($maxSize * 1024), $recFID), $propArr['event_pid']);
                                                                }
                                                                // If the destination file was created, we will set the new filename in the value array, otherwise unset the entry in the value array!
                                                                if (@is_file($theDestFile)) {
@@ -2109,7 +2109,7 @@ class DataHandler {
                                                        }
                                                }
                                                $theFile = GeneralUtility::fixWindowsFilePath($theFile);
-                                               if (\TYPO3\CMS\Core\Utility\GeneralUtility::isFirstPartOfStr($theFile, PATH_site)) {
+                                               if (GeneralUtility::isFirstPartOfStr($theFile, PATH_site)) {
                                                        $theFile = substr($theFile, strlen(PATH_site));
                                                }
                                        }
@@ -2493,7 +2493,7 @@ class DataHandler {
                                        break;
                                case 'domainname':
                                        if (!preg_match('/^[a-z0-9\\.\\-]*$/i', $value)) {
-                                               \TYPO3\CMS\Core\Utility\GeneralUtility::requireOnce(PATH_typo3 . 'contrib/idna/idna_convert.class.php');
+                                               GeneralUtility::requireOnce(PATH_typo3 . 'contrib/idna/idna_convert.class.php');
                                                $idnaConvert = new \idna_convert();
                                                $idnaConvert->set_parameter('idn_version', '2008');
                                                $value = $idnaConvert->encode($value);
@@ -2572,7 +2572,7 @@ class DataHandler {
         * @todo Define visibility
         */
        public function checkValue_group_select_explodeSelectGroupValue($value) {
-               $valueArray = GeneralUtility::trimExplode(',', $value, 1);
+               $valueArray = GeneralUtility::trimExplode(',', $value, TRUE);
                foreach ($valueArray as &$newVal) {
                        $temp = explode('|', $newVal, 2);
                        $newVal = str_replace(',', '', str_replace('|', '', rawurldecode($temp[0])));
@@ -2940,7 +2940,7 @@ class DataHandler {
                                //Used to check language and general editing rights
                                if ($language > 0 && $this->BE_USER->checkLanguageAccess($language) || $this->BE_USER->recordEditAccessInternals($table, $uid, FALSE, FALSE, $fullLanguageCheckNeeded)) {
                                        $data = array();
-                                       $nonFields = array_unique(\TYPO3\CMS\Core\Utility\GeneralUtility::trimExplode(',', 'uid,perms_userid,perms_groupid,perms_user,perms_group,perms_everybody,t3ver_oid,t3ver_wsid,t3ver_id,t3ver_label,t3ver_state,t3ver_count,t3ver_stage,t3ver_tstamp,' . $excludeFields, 1));
+                                       $nonFields = array_unique(GeneralUtility::trimExplode(',', 'uid,perms_userid,perms_groupid,perms_user,perms_group,perms_everybody,t3ver_oid,t3ver_wsid,t3ver_id,t3ver_label,t3ver_state,t3ver_count,t3ver_stage,t3ver_tstamp,' . $excludeFields, TRUE));
                                        // So it copies (and localized) content from workspace...
                                        $row = BackendUtility::getRecordWSOL($table, $uid);
                                        if (is_array($row)) {
@@ -3061,7 +3061,7 @@ class DataHandler {
                if (!strstr($this->copyWhichTables, '*')) {
                        foreach ($copyTablesArray as $k => $table) {
                                // Pages are always going...
-                               if (!$table || !\TYPO3\CMS\Core\Utility\GeneralUtility::inList(($this->copyWhichTables . ',pages'), $table)) {
+                               if (!$table || !GeneralUtility::inList(($this->copyWhichTables . ',pages'), $table)) {
                                        unset($copyTablesArray[$k]);
                                }
                        }
@@ -3412,7 +3412,7 @@ class DataHandler {
                                        }
                                }
                        } else {
-                               $theFileValues = GeneralUtility::trimExplode(',', $value, 1);
+                               $theFileValues = GeneralUtility::trimExplode(',', $value, TRUE);
                        }
                        // Traverse this array of files:
                        $uploadFolder = $conf['internal_type'] == 'file' ? $conf['uploadfolder'] : '';
@@ -3456,7 +3456,7 @@ class DataHandler {
                        foreach ($recs as $rec) {
                                $filename = basename($rec['ref_string']);
                                $fileInfo = array();
-                               if (\TYPO3\CMS\Core\Utility\GeneralUtility::isFirstPartOfStr($filename, 'RTEmagicC_')) {
+                               if (GeneralUtility::isFirstPartOfStr($filename, 'RTEmagicC_')) {
                                        $fileInfo['exists'] = @is_file((PATH_site . $rec['ref_string']));
                                        $fileInfo['original'] = substr($rec['ref_string'], 0, -strlen($filename)) . 'RTEmagicP_' . preg_replace('/\\.[[:alnum:]]+$/', '', substr($filename, 10));
                                        $fileInfo['original_exists'] = @is_file((PATH_site . $fileInfo['original']));
@@ -3475,8 +3475,8 @@ class DataHandler {
                                                        $copyDestName = dirname($origDestName) . '/RTEmagicC_' . substr(basename($origDestName), 10) . '.' . $pI['extension'];
                                                        if (!@is_file($copyDestName) && !@is_file($origDestName) && $origDestName === GeneralUtility::getFileAbsFileName($origDestName) && $copyDestName === GeneralUtility::getFileAbsFileName($copyDestName)) {
                                                                // Making copies:
-                                                               \TYPO3\CMS\Core\Utility\GeneralUtility::upload_copy_move(PATH_site . $fileInfo['original'], $origDestName);
-                                                               \TYPO3\CMS\Core\Utility\GeneralUtility::upload_copy_move(PATH_site . $rec['ref_string'], $copyDestName);
+                                                               GeneralUtility::upload_copy_move(PATH_site . $fileInfo['original'], $origDestName);
+                                                               GeneralUtility::upload_copy_move(PATH_site . $rec['ref_string'], $copyDestName);
                                                                clearstatcache();
                                                                // Register this:
                                                                $this->RTEmagic_copyIndex[$rec['tablename']][$rec['recuid']][$rec['field']][$rec['ref_string']] = substr($copyDestName, strlen(PATH_site));
@@ -3941,7 +3941,7 @@ class DataHandler {
                                                                                                        }
                                                                                                        $overrideValues[$fN] = '[' . $translateToMsg . '] ' . $row[$fN];
                                                                                                }
-                                                                                       } elseif (\TYPO3\CMS\Core\Utility\GeneralUtility::inList('exclude,noCopy,mergeIfNotBlank', $fCfg['l10n_mode']) && $fN != $GLOBALS['TCA'][$Ttable]['ctrl']['languageField'] && $fN != $GLOBALS['TCA'][$Ttable]['ctrl']['transOrigPointerField']) {
+                                                                                       } elseif (GeneralUtility::inList('exclude,noCopy,mergeIfNotBlank', $fCfg['l10n_mode']) && $fN != $GLOBALS['TCA'][$Ttable]['ctrl']['languageField'] && $fN != $GLOBALS['TCA'][$Ttable]['ctrl']['transOrigPointerField']) {
                                                                                                // Otherwise, do not copy field (unless it is the language field or
                                                                                                // pointer to the original language)
                                                                                                $excludeFields[] = $fN;
@@ -4013,7 +4013,7 @@ class DataHandler {
                $parts = GeneralUtility::trimExplode(',', $command);
                $field = $parts[0];
                $type = $parts[1];
-               if ($field && (\TYPO3\CMS\Core\Utility\GeneralUtility::inList('localize,synchronize', $type) || \TYPO3\CMS\Core\Utility\MathUtility::canBeInterpretedAsInteger($type)) && isset($GLOBALS['TCA'][$table]['columns'][$field]['config'])) {
+               if ($field && (GeneralUtility::inList('localize,synchronize', $type) || \TYPO3\CMS\Core\Utility\MathUtility::canBeInterpretedAsInteger($type)) && isset($GLOBALS['TCA'][$table]['columns'][$field]['config'])) {
                        $config = $GLOBALS['TCA'][$table]['columns'][$field]['config'];
                        $foreignTable = $config['foreign_table'];
                        $localizationMode = BackendUtility::getInlineLocalizationMode($table, $config);
@@ -4064,7 +4064,7 @@ class DataHandler {
                                                        $item['id'] = $this->localize($item['table'], $item['id'], $language);
                                                        $item['id'] = $this->overlayAutoVersionId($item['table'], $item['id']);
                                                        $dbAnalysisCurrent->itemArray[] = $item;
-                                               } elseif (\TYPO3\CMS\Core\Utility\GeneralUtility::inList('localize,synchronize', $type)) {
+                                               } elseif (GeneralUtility::inList('localize,synchronize', $type)) {
                                                        foreach ($elementsOriginal as $originalId => $item) {
                                                                $item['id'] = $this->localize($item['table'], $item['id'], $language);
                                                                $item['id'] = $this->overlayAutoVersionId($item['table'], $item['id']);
@@ -4346,7 +4346,7 @@ class DataHandler {
                if ($force) {
                        // Returns the branch WITHOUT permission checks (0 secures that)
                        $brExist = $this->doesBranchExist('', $uid, 0, 1);
-                       $res = GeneralUtility::trimExplode(',', $brExist . $uid, 1);
+                       $res = GeneralUtility::trimExplode(',', $brExist . $uid, TRUE);
                } else {
                        $res = $this->canDeletePage($uid);
                }
@@ -4404,7 +4404,7 @@ class DataHandler {
                                // Checks if we had permissions
                                if ($brExist != -1) {
                                        if ($this->noRecordsFromUnallowedTables($brExist . $uid)) {
-                                               $pagesInBranch = GeneralUtility::trimExplode(',', $brExist . $uid, 1);
+                                               $pagesInBranch = GeneralUtility::trimExplode(',', $brExist . $uid, TRUE);
                                                foreach ($pagesInBranch as $pageInBranch) {
                                                        if (!$this->BE_USER->recordEditAccessInternals('pages', $pageInBranch, FALSE, FALSE, TRUE)) {
                                                                return 'Attempt to delete page which has prohibited localizations.';
@@ -4884,7 +4884,7 @@ class DataHandler {
                // Table name to prepend the UID
                $prependName = $conf['type'] == 'group' ? $conf['prepend_tname'] : '';
                // Which tables that should possibly not be remapped
-               $dontRemapTables = GeneralUtility::trimExplode(',', $conf['dontRemapTablesOnCopy'], 1);
+               $dontRemapTables = GeneralUtility::trimExplode(',', $conf['dontRemapTablesOnCopy'], TRUE);
                // Convert value to list of references:
                $dbAnalysis = GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\Database\\RelationHandler');
                $dbAnalysis->registerNonTableValues = $conf['type'] == 'select' && $conf['allowNonIdValues'] ? 1 : 0;
@@ -5348,7 +5348,7 @@ class DataHandler {
                        // Check non-root-level
                        $doktype = $this->pageInfo($page_uid, 'doktype');
                        $allowedTableList = isset($GLOBALS['PAGES_TYPES'][$doktype]['allowedTables']) ? $GLOBALS['PAGES_TYPES'][$doktype]['allowedTables'] : $GLOBALS['PAGES_TYPES']['default']['allowedTables'];
-                       $allowedArray = GeneralUtility::trimExplode(',', $allowedTableList, 1);
+                       $allowedArray = GeneralUtility::trimExplode(',', $allowedTableList, TRUE);
                        // If all tables or the table is listed as a allowed type, return TRUE
                        if (strstr($allowedTableList, '*') || in_array($checkTable, $allowedArray)) {
                                return TRUE;
@@ -5544,7 +5544,7 @@ class DataHandler {
                foreach (array_keys($GLOBALS['TCA']) as $table) {
                        if (isset($GLOBALS['TCA'][$table]['columns'])) {
                                foreach ($GLOBALS['TCA'][$table]['columns'] as $field => $config) {
-                                       if ($config['exclude'] && !\TYPO3\CMS\Core\Utility\GeneralUtility::inList($this->BE_USER->groupData['non_exclude_fields'], ($table . ':' . $field))) {
+                                       if ($config['exclude'] && !GeneralUtility::inList($this->BE_USER->groupData['non_exclude_fields'], ($table . ':' . $field))) {
                                                $list[] = $table . '-' . $field;
                                        }
                                }
@@ -5568,7 +5568,7 @@ class DataHandler {
                        return FALSE;
                }
                $allowedTableList = isset($GLOBALS['PAGES_TYPES'][$doktype]['allowedTables']) ? $GLOBALS['PAGES_TYPES'][$doktype]['allowedTables'] : $GLOBALS['PAGES_TYPES']['default']['allowedTables'];
-               $allowedArray = GeneralUtility::trimExplode(',', $allowedTableList, 1);
+               $allowedArray = GeneralUtility::trimExplode(',', $allowedTableList, TRUE);
                // If all tables is OK the return TRUE
                if (strstr($allowedTableList, '*')) {
                        // OK...
@@ -6240,7 +6240,7 @@ class DataHandler {
         * @todo Define visibility
         */
        public function assemblePermissions($string) {
-               $keyArr = GeneralUtility::trimExplode(',', $string, 1);
+               $keyArr = GeneralUtility::trimExplode(',', $string, TRUE);
                $value = 0;
                foreach ($keyArr as $key) {
                        if ($key && isset($this->pMap[$key])) {
@@ -6401,7 +6401,7 @@ class DataHandler {
         * @todo Define visibility
         */
        public function removeCacheFiles() {
-               \TYPO3\CMS\Core\Utility\GeneralUtility::logDeprecatedFunction();
+               GeneralUtility::logDeprecatedFunction();
                return \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::removeCacheFiles();
        }
 
@@ -6458,7 +6458,7 @@ class DataHandler {
                        $newData = array();
                        foreach ($GLOBALS['TCA'][$table]['columns'] as $field => $conf) {
                                if ($conf['config']['type'] == 'input') {
-                                       $evalCodesArray = GeneralUtility::trimExplode(',', $conf['config']['eval'], 1);
+                                       $evalCodesArray = GeneralUtility::trimExplode(',', $conf['config']['eval'], TRUE);
                                        if (in_array('uniqueInPid', $evalCodesArray)) {
                                                $newV = $this->getUnique($table, $field, $curData[$field], $uid, $curData['pid']);
                                                if (strcmp($newV, $curData[$field])) {
@@ -6489,7 +6489,7 @@ class DataHandler {
        public function fixCopyAfterDuplFields($table, $uid, $prevUid, $update, $newData = array()) {
                if ($GLOBALS['TCA'][$table] && $GLOBALS['TCA'][$table]['ctrl']['copyAfterDuplFields']) {
                        $prevData = $this->recordInfo($table, $prevUid, '*');
-                       $theFields = GeneralUtility::trimExplode(',', $GLOBALS['TCA'][$table]['ctrl']['copyAfterDuplFields'], 1);
+                       $theFields = GeneralUtility::trimExplode(',', $GLOBALS['TCA'][$table]['ctrl']['copyAfterDuplFields'], TRUE);
                        foreach ($theFields as $field) {
                                if ($GLOBALS['TCA'][$table]['columns'][$field] && ($update || !isset($newData[$field]))) {
                                        $newData[$field] = $prevData[$field];
@@ -6529,12 +6529,12 @@ class DataHandler {
         * @deprecated since 6.1, will be removed in two versions, use \TYPO3\CMS\Version\Hook\DataHandlerHook::getUniqueFields() instead
         */
        public function getUniqueFields($table) {
-               \TYPO3\CMS\Core\Utility\GeneralUtility::logDeprecatedFunction();
+               GeneralUtility::logDeprecatedFunction();
                $listArr = array();
                if ($GLOBALS['TCA'][$table]['columns']) {
                        foreach ($GLOBALS['TCA'][$table]['columns'] as $field => $configArr) {
                                if ($configArr['config']['type'] === 'input') {
-                                       $evalCodesArray = GeneralUtility::trimExplode(',', $configArr['config']['eval'], 1);
+                                       $evalCodesArray = GeneralUtility::trimExplode(',', $configArr['config']['eval'], TRUE);
                                        if (in_array('uniqueInPid', $evalCodesArray) || in_array('unique', $evalCodesArray)) {
                                                $listArr[] = $field;
                                        }
@@ -6802,7 +6802,7 @@ class DataHandler {
                                                foreach ($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_tcemain.php']['clearPageCacheEval'] as $funcName) {
                                                        $_params = array('pageIdArray' => &$list_cache, 'table' => $table, 'uid' => $uid, 'functionID' => 'clear_cache()');
                                                        // Returns the array of ids to clear, FALSE if nothing should be cleared! Never an empty array!
-                                                       \TYPO3\CMS\Core\Utility\GeneralUtility::callUserFunction($funcName, $_params, $this);
+                                                       GeneralUtility::callUserFunction($funcName, $_params, $this);
                                                }
                                        }
                                        // Delete cache for selected pages:
@@ -6819,7 +6819,7 @@ class DataHandler {
                        }
                        // Clear cache for pages entered in TSconfig:
                        if ($TSConfig['clearCacheCmd']) {
-                               $Commands = GeneralUtility::trimExplode(',', $TSConfig['clearCacheCmd'], 1);
+                               $Commands = GeneralUtility::trimExplode(',', $TSConfig['clearCacheCmd'], TRUE);
                                $Commands = array_unique($Commands);
                                foreach ($Commands as $cmdPart) {
                                        $this->clear_cacheCmd($cmdPart);
@@ -6829,7 +6829,7 @@ class DataHandler {
                        if (is_array($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_tcemain.php']['clearCachePostProc'])) {
                                $_params = array('table' => $table, 'uid' => $uid, 'uid_page' => $pageUid, 'TSConfig' => $TSConfig);
                                foreach ($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_tcemain.php']['clearCachePostProc'] as $_funcRef) {
-                                       \TYPO3\CMS\Core\Utility\GeneralUtility::callUserFunction($_funcRef, $_params, $this);
+                                       GeneralUtility::callUserFunction($_funcRef, $_params, $this);
                                }
                        }
                }
@@ -6912,7 +6912,7 @@ class DataHandler {
                                        foreach ($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_tcemain.php']['clearPageCacheEval'] as $funcName) {
                                                $_params = array('pageIdArray' => &$list_cache, 'cacheCmd' => $cacheCmd, 'functionID' => 'clear_cacheCmd()');
                                                // Returns the array of ids to clear, FALSE if nothing should be cleared! Never an empty array!
-                                               \TYPO3\CMS\Core\Utility\GeneralUtility::callUserFunction($funcName, $_params, $this);
+                                               GeneralUtility::callUserFunction($funcName, $_params, $this);
                                        }
                                }
                                // Delete cache for selected pages:
@@ -6924,7 +6924,7 @@ class DataHandler {
                        }
                }
                // flush cache by tag
-               if (\TYPO3\CMS\Core\Utility\GeneralUtility::isFirstPartOfStr(strtolower($cacheCmd), 'cachetag:')) {
+               if (GeneralUtility::isFirstPartOfStr(strtolower($cacheCmd), 'cachetag:')) {
                        $cacheTag = substr($cacheCmd, 9);
                        $tagsToFlush[] = $cacheTag;
                }
@@ -6943,7 +6943,7 @@ class DataHandler {
                if (is_array($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_tcemain.php']['clearCachePostProc'])) {
                        $_params = array('cacheCmd' => strtolower($cacheCmd));
                        foreach ($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_tcemain.php']['clearCachePostProc'] as $_funcRef) {
-                               \TYPO3\CMS\Core\Utility\GeneralUtility::callUserFunction($_funcRef, $_params, $this);
+                               GeneralUtility::callUserFunction($_funcRef, $_params, $this);
                        }
                }
        }
@@ -7076,7 +7076,7 @@ class DataHandler {
                                case 'inline':
                                        if ($GLOBALS['TCA'][$table]['columns'][$field]['config']['foreign_field']) {
                                                if (!\TYPO3\CMS\Core\Utility\MathUtility::canBeInterpretedAsInteger($value)) {
-                                                       $result[$field] = count(\TYPO3\CMS\Core\Utility\GeneralUtility::trimExplode(',', $value, TRUE));
+                                                       $result[$field] = count(GeneralUtility::trimExplode(',', $value, TRUE));
                                                }
                                        }
                                        break;
index bf516a4..2235f0b 100644 (file)
@@ -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]) {
index 251e87e..a0474c7 100644 (file)
@@ -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();
index db30dbb..86aa7ff 100644 (file)
@@ -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);
                if (strlen($browserTarget)) {
                        $finalTagParts['target'] = $browserTarget;
                }
index 8c2a91e..d00f55a 100644 (file)
@@ -127,7 +127,7 @@ class FrontendEditingController {
        public function displayEditIcons($content, $params, array $conf = array(), $currentRecord = '', array $dataArray = array(), $addUrlParamStr = '') {
                // Check incoming params:
                list($currentRecordTable, $currentRecordUID) = explode(':', $currentRecord);
-               list($fieldList, $table) = array_reverse(\TYPO3\CMS\Core\Utility\GeneralUtility::trimExplode(':', $params, 1));
+               list($fieldList, $table) = array_reverse(\TYPO3\CMS\Core\Utility\GeneralUtility::trimExplode(':', $params, TRUE));
                // Reverse the array because table is optional
                if (!$table) {
                        $table = $currentRecordTable;
@@ -484,7 +484,7 @@ class FrontendEditingController {
                        }
                        if (!$conf['onlyCurrentPid'] || $dataArray['pid'] == $GLOBALS['TSFE']->id) {
                                // Permissions:
-                               $types = \TYPO3\CMS\Core\Utility\GeneralUtility::trimExplode(',', \TYPO3\CMS\Core\Utility\GeneralUtility::strtolower($conf['allow']), 1);
+                               $types = \TYPO3\CMS\Core\Utility\GeneralUtility::trimExplode(',', \TYPO3\CMS\Core\Utility\GeneralUtility::strtolower($conf['allow']), TRUE);
                                $allow = array_flip($types);
                                $perms = $GLOBALS['BE_USER']->calcPerms($GLOBALS['TSFE']->page);
                                if ($table == 'pages') {
index b08434b..634b5f8 100644 (file)
@@ -325,7 +325,7 @@ class HtmlParser {
         * @todo Define visibility
         */
        public function splitIntoBlock($tag, $content, $eliminateExtraEndTags = FALSE) {
-               $tags = array_unique(GeneralUtility::trimExplode(',', $tag, 1));
+               $tags = array_unique(GeneralUtility::trimExplode(',', $tag, TRUE));
                foreach ($tags as &$tag) {
                        $tag = preg_quote($tag, '/');
                }
@@ -431,7 +431,7 @@ class HtmlParser {
         * @todo Define visibility
         */
        public function splitTags($tag, $content) {
-               $tags = GeneralUtility::trimExplode(',', $tag, 1);
+               $tags = GeneralUtility::trimExplode(',', $tag, TRUE);
                foreach ($tags as &$tag) {
                        $tag = preg_quote($tag, '/');
                }
@@ -777,7 +777,7 @@ class HtmlParser {
                                                                                $newTagAttrib = array();
                                                                                if (!($tList = $tags[$tagName]['_allowedAttribs'])) {
                                                                                        // Just explode attribts for tag once
-                                                                                       $tList = ($tags[$tagName]['_allowedAttribs'] = GeneralUtility::trimExplode(',', strtolower($tags[$tagName]['allowedAttribs']), 1));
+                                                                                       $tList = ($tags[$tagName]['_allowedAttribs'] = GeneralUtility::trimExplode(',', strtolower($tags[$tagName]['allowedAttribs']), TRUE));
                                                                                }
                                                                                foreach ($tList as $allowTag) {
                                                                                        if (isset($tagAttrib[0][$allowTag])) {
@@ -1176,7 +1176,7 @@ class HtmlParser {
         * @todo Define visibility
         */
        public function unprotectTags($content, $tagList = '') {
-               $tagsArray = GeneralUtility::trimExplode(',', $tagList, 1);
+               $tagsArray = GeneralUtility::trimExplode(',', $tagList, TRUE);
                $contentParts = explode('&lt;', $content);
                next($contentParts);
                // bypass the first
@@ -1217,7 +1217,7 @@ class HtmlParser {
         */
        public function stripTagsExcept($value, $tagList) {
                GeneralUtility::logDeprecatedFunction();
-               $tags = GeneralUtility::trimExplode(',', $tagList, 1);
+               $tags = GeneralUtility::trimExplode(',', $tagList, TRUE);
                $forthArr = array();
                $backArr = array();
                foreach ($tags as $theTag) {
@@ -1336,7 +1336,7 @@ class HtmlParser {
         */
        public function HTMLparserConfig($TSconfig, $keepTags = array()) {
                // Allow tags (base list, merged with incoming array)
-               $alTags = array_flip(GeneralUtility::trimExplode(',', strtolower($TSconfig['allowTags']), 1));
+               $alTags = array_flip(GeneralUtility::trimExplode(',', strtolower($TSconfig['allowTags']), TRUE));
                $keepTags = array_merge($alTags, $keepTags);
                // Set config properties.
                if (is_array($TSconfig['tags.'])) {
@@ -1383,7 +1383,7 @@ class HtmlParser {
                }
                // LocalNesting
                if ($TSconfig['localNesting']) {
-                       $lN = GeneralUtility::trimExplode(',', strtolower($TSconfig['localNesting']), 1);
+                       $lN = GeneralUtility::trimExplode(',', strtolower($TSconfig['localNesting']), TRUE);
                        foreach ($lN as $tn) {
                                if (isset($keepTags[$tn])) {
                                        $keepTags[$tn]['nesting'] = 1;
@@ -1391,7 +1391,7 @@ class HtmlParser {
                        }
                }
                if ($TSconfig['globalNesting']) {
-                       $lN = GeneralUtility::trimExplode(',', strtolower($TSconfig['globalNesting']), 1);
+                       $lN = GeneralUtility::trimExplode(',', strtolower($TSconfig['globalNesting']), TRUE);
                        foreach ($lN as $tn) {
                                if (isset($keepTags[$tn])) {
                                        if (!is_array($keepTags[$tn])) {
@@ -1402,7 +1402,7 @@ class HtmlParser {
                        }
                }
                if ($TSconfig['rmTagIfNoAttrib']) {
-                       $lN = GeneralUtility::trimExplode(',', strtolower($TSconfig['rmTagIfNoAttrib']), 1);
+                       $lN = GeneralUtility::trimExplode(',', strtolower($TSconfig['rmTagIfNoAttrib']), TRUE);
                        foreach ($lN as $tn) {
                                if (isset($keepTags[$tn])) {
                                        if (!is_array($keepTags[$tn])) {
@@ -1413,7 +1413,7 @@ class HtmlParser {
                        }
                }
                if ($TSconfig['noAttrib']) {
-                       $lN = GeneralUtility::trimExplode(',', strtolower($TSconfig['noAttrib']), 1);
+                       $lN = GeneralUtility::trimExplode(',', strtolower($TSconfig['noAttrib']), TRUE);
                        foreach ($lN as $tn) {
                                if (isset($keepTags[$tn])) {
                                        if (!is_array($keepTags[$tn])) {
@@ -1424,7 +1424,7 @@ class HtmlParser {
                        }
                }
                if ($TSconfig['removeTags']) {
-                       $lN = GeneralUtility::trimExplode(',', strtolower($TSconfig['removeTags']), 1);
+                       $lN = GeneralUtility::trimExplode(',', strtolower($TSconfig['removeTags']), TRUE);
                        foreach ($lN as $tn) {
                                $keepTags[$tn] = array();
                                $keepTags[$tn]['allowedAttribs'] = 0;
index bbd6494..d8d0f24 100644 (file)
@@ -227,7 +227,7 @@ class RteHtmlParser extends \TYPO3\CMS\Core\Html\HtmlParser {
                        $modes[$revmodes['ts_css']] = 'css_transform,ts_images,ts_links';
                }
                // Make list unique
-               $modes = array_unique(GeneralUtility::trimExplode(',', implode(',', $modes), 1));
+               $modes = array_unique(GeneralUtility::trimExplode(',', implode(',', $modes), TRUE));
                // Reverse order if direction is "rte"
                if ($direction == 'rte') {
                        $modes = array_reverse($modes);
@@ -271,7 +271,7 @@ class RteHtmlParser extends \TYPO3\CMS\Core\Html\HtmlParser {
                                                case 'ts_transform':
 
                                                case 'css_transform':
-                                                       $this->allowedClasses = GeneralUtility::trimExplode(',', $this->procOptions['allowedClasses'], 1);
+                                                       $this->allowedClasses = GeneralUtility::trimExplode(',', $this->procOptions['allowedClasses'], TRUE);
                                                        // CR has a very disturbing effect, so just remove all CR and rely on LF
                                                        $value = str_replace(CR, '', $value);
                                                        // Transform empty paragraphs into spacing paragraphs
@@ -1227,14 +1227,14 @@ class RteHtmlParser extends \TYPO3\CMS\Core\Html\HtmlParser {
                        // Setting up allowed tags:
                        // If the $tagList input var is set, this will take precedence
                        if (strcmp($tagList, '')) {
-                               $keepTags = array_flip(GeneralUtility::trimExplode(',', $tagList, 1));
+                               $keepTags = array_flip(GeneralUtility::trimExplode(',', $tagList, TRUE));
                        } else {
                                // Default is to get allowed/denied tags from internal array of processing options:
                                // Construct default list of tags to keep:
                                $typoScript_list = 'b,i,u,a,img,br,div,center,pre,font,hr,sub,sup,p,strong,em,li,ul,ol,blockquote,strike,span';
-                               $keepTags = array_flip(GeneralUtility::trimExplode(',', $typoScript_list . ',' . strtolower($this->procOptions['allowTags']), 1));
+                               $keepTags = array_flip(GeneralUtility::trimExplode(',', $typoScript_list . ',' . strtolower($this->procOptions['allowTags']), TRUE));
                                // For tags to deny, remove them from $keepTags array:
-                               $denyTags = GeneralUtility::trimExplode(',', $this->procOptions['denyTags'], 1);
+                               $denyTags = GeneralUtility::trimExplode(',', $this->procOptions['denyTags'], TRUE);
                                foreach ($denyTags as $dKe) {
                                        unset($keepTags[$dKe]);
                                }
@@ -1283,7 +1283,7 @@ class RteHtmlParser extends \TYPO3\CMS\Core\Html\HtmlParser {
                                        }
                                        // Setting up font tags if they are allowed:
                                        if (isset($keepTags['font'])) {
-                                               $colors = array_merge(array(''), GeneralUtility::trimExplode(',', $this->procOptions['allowedFontColors'], 1));
+                                               $colors = array_merge(array(''), GeneralUtility::trimExplode(',', $this->procOptions['allowedFontColors'], TRUE));
                                                $keepTags['font'] = array(
                                                        'allowedAttribs' => 'face,color,size',
                                                        'fixAttrib' => array(
@@ -1346,12 +1346,12 @@ class RteHtmlParser extends \TYPO3\CMS\Core\Html\HtmlParser {
                        $value = $this->internalizeFontTags($value);
                }
                // Setting configuration for processing:
-               $allowTagsOutside = GeneralUtility::trimExplode(',', strtolower($this->procOptions['allowTagsOutside'] ? 'hr,' . $this->procOptions['allowTagsOutside'] : 'hr,img'), 1);
+               $allowTagsOutside = GeneralUtility::trimExplode(',', strtolower($this->procOptions['allowTagsOutside'] ? 'hr,' . $this->procOptions['allowTagsOutside'] : 'hr,img'), TRUE);
                $remapParagraphTag = strtoupper($this->procOptions['remapParagraphTag']);
                $divSplit = $this->splitIntoBlock('div,p', $value, 1);
                // Setting the third param to 1 will eliminate false end-tags. Maybe this is a good thing to do...?
                if ($this->procOptions['keepPDIVattribs']) {
-                       $keepAttribListArr = GeneralUtility::trimExplode(',', strtolower($this->procOptions['keepPDIVattribs']), 1);
+                       $keepAttribListArr = GeneralUtility::trimExplode(',', strtolower($this->procOptions['keepPDIVattribs']), TRUE);
                } else {
                        $keepAttribListArr = array();
                }
index 42db463..d23666d 100644 (file)
@@ -1151,7 +1151,7 @@ class GraphicalFunctions {
                                        case 'charRange':
                                                if (strlen($cfg['value'])) {
                                                        // Initialize range:
-                                                       $ranges = GeneralUtility::trimExplode(',', $cfg['value'], 1);
+                                                       $ranges = GeneralUtility::trimExplode(',', $cfg['value'], TRUE);
                                                        foreach ($ranges as $i => $rangeDef) {
                                                                $ranges[$i] = GeneralUtility::intExplode('-', $ranges[$i]);
                                                                if (!isset($ranges[$i][1])) {
index 0fd2979..4bdb82e 100644 (file)
@@ -279,7 +279,7 @@ abstract class AbstractService {
         */
        public function checkExec($progList) {
                $ret = TRUE;
-               $progList = \TYPO3\CMS\Core\Utility\GeneralUtility::trimExplode(',', $progList, 1);
+               $progList = \TYPO3\CMS\Core\Utility\GeneralUtility::trimExplode(',', $progList, TRUE);
                foreach ($progList as $prog) {
                        if (!\TYPO3\CMS\Core\Utility\CommandUtility::checkCommand($prog)) {
                                // Program not found
index 0a04084..824cb40 100644 (file)
@@ -346,7 +346,7 @@ class TimeTracker {
                                }
                        }
                        if ($flag_tree) {
-                               $tmp = \TYPO3\CMS\Core\Utility\GeneralUtility::trimExplode('.', $data['key'], 1);
+                               $tmp = \TYPO3\CMS\Core\Utility\GeneralUtility::trimExplode('.', $data['key'], TRUE);
                                $theLabel = end($tmp);
                        } else {
                                $theLabel = $data['key'];
index 9c3d310..773013a 100644 (file)
@@ -1510,7 +1510,7 @@ class TemplateService {
                // Create map if not found already:
                if (!is_array($this->MPmap)) {
                        $this->MPmap = array();
-                       $rootPoints = GeneralUtility::trimExplode(',', strtolower($GLOBALS['TSFE']->config['config']['MP_mapRootPoints']), 1);
+                       $rootPoints = GeneralUtility::trimExplode(',', strtolower($GLOBALS['TSFE']->config['config']['MP_mapRootPoints']), TRUE);
                        // Traverse rootpoints:
                        foreach ($rootPoints as $p) {
                                if ($p == 'root') {
@@ -1601,4 +1601,4 @@ class TemplateService {
 }
 
 
-?>
\ No newline at end of file
+?>
index 7c7124d..2ea68a8 100644 (file)
@@ -326,7 +326,7 @@ class CommandUtility {
                }
                        // Merge the submitted paths array to the global
                if ($paths) {
-                       $paths = GeneralUtility::trimExplode(',', $paths, 1);
+                       $paths = GeneralUtility::trimExplode(',', $paths, TRUE);
                        if (is_array($paths)) {
                                foreach ($paths as $path) {
                                                // Make absolute path of relative
@@ -365,7 +365,7 @@ class CommandUtility {
                if ($GLOBALS['TYPO3_CONF_VARS']['SYS']['binSetup']) {
                        $pathSetup = preg_split('/[\n,]+/', $GLOBALS['TYPO3_CONF_VARS']['SYS']['binSetup']);
                        foreach ($pathSetup as $val) {
-                               list($cmd, $cmdPath) = GeneralUtility::trimExplode('=', $val, 1);
+                               list($cmd, $cmdPath) = GeneralUtility::trimExplode('=', $val, TRUE);
                                $cmdArr[$cmd]['app'] = basename($cmdPath);
                                $cmdArr[$cmd]['path'] = dirname($cmdPath) . '/';
                                $cmdArr[$cmd]['valid'] = TRUE;
@@ -394,7 +394,7 @@ class CommandUtility {
 
                        // Add configured paths
                if ($GLOBALS['TYPO3_CONF_VARS']['SYS']['binPath']) {
-                       $sysPath = GeneralUtility::trimExplode(',', $GLOBALS['TYPO3_CONF_VARS']['SYS']['binPath'], 1);
+                       $sysPath = GeneralUtility::trimExplode(',', $GLOBALS['TYPO3_CONF_VARS']['SYS']['binPath'], TRUE);
                        foreach ($sysPath as $val) {
                                $val = self::fixPath($val);
                                $sysPathArr[$val] = $val;
@@ -405,7 +405,7 @@ class CommandUtility {
                        // TODO: how does this work for WIN
                if ($GLOBALS['_SERVER']['PATH']) {
                        $sep = (TYPO3_OS == 'WIN' ? ';' : ':');
-                       $envPath = GeneralUtility::trimExplode($sep, $GLOBALS['_SERVER']['PATH'], 1);
+                       $envPath = GeneralUtility::trimExplode($sep, $GLOBALS['_SERVER']['PATH'], TRUE);
                        foreach ($envPath as $val) {
                                $val = self::fixPath($val);
                                $sysPathArr[$val] = $val;
index 3221a7f..b7dcf43 100644 (file)
@@ -189,7 +189,7 @@ class DiffUtility {
                $strArr = \TYPO3\CMS\Core\Utility\GeneralUtility::trimExplode(LF, $str);
                $outArray = array();
                foreach ($strArr as $lineOfWords) {
-                       $allWords = \TYPO3\CMS\Core\Utility\GeneralUtility::trimExplode(' ', $lineOfWords, 1);
+                       $allWords = \TYPO3\CMS\Core\Utility\GeneralUtility::trimExplode(' ', $lineOfWords, TRUE);
                        $outArray[] = $allWords;
                        $outArray[] = array('');
                        $outArray[] = array('');
@@ -217,4 +217,4 @@ class DiffUtility {
 }
 
 
-?>
\ No newline at end of file
+?>
index f896b6c..6f072e3 100644 (file)
@@ -806,8 +806,8 @@ class ExtensionManagementUtility {
                if (isset($GLOBALS['TBE_MODULES'][$main]) && $sub) {
                        // If there is already a main module by this name:
                        // Adding the submodule to the correct position:
-                       list($place, $modRef) = GeneralUtility::trimExplode(':', $position, 1);
-                       $mods = GeneralUtility::trimExplode(',', $GLOBALS['TBE_MODULES'][$main], 1);
+                       list($place, $modRef) = GeneralUtility::trimExplode(':', $position, TRUE);
+                       $mods = GeneralUtility::trimExplode(',', $GLOBALS['TBE_MODULES'][$main], TRUE);
                        if (!in_array($sub, $mods)) {
                                switch (strtolower($place)) {
                                        case 'after':
@@ -1065,7 +1065,7 @@ class ExtensionManagementUtility {
                $priority = 0;
                $quality = 0;
                if (!is_array($excludeServiceKeys)) {
-                       $excludeServiceKeys = GeneralUtility::trimExplode(',', $excludeServiceKeys, 1);
+                       $excludeServiceKeys = GeneralUtility::trimExplode(',', $excludeServiceKeys, TRUE);
                }
                if (is_array($GLOBALS['T3_SERVICES'][$serviceType])) {
                        foreach ($GLOBALS['T3_SERVICES'][$serviceType] as $key => $info) {
@@ -1137,7 +1137,7 @@ class ExtensionManagementUtility {
        static public function isServiceAvailable($serviceType, $serviceKey, $serviceDetails) {
                // If the service depends on external programs - check if they exists
                if (trim($serviceDetails['exec'])) {
-                       $executables = GeneralUtility::trimExplode(',', $serviceDetails['exec'], 1);
+                       $executables = GeneralUtility::trimExplode(',', $serviceDetails['exec'], TRUE);
                        foreach ($executables as $executable) {
                                // If at least one executable file is not available, exit early returning FALSE
                                if (!\TYPO3\CMS\Core\Utility\CommandUtility::checkCommand($executable)) {
index 3077040..32fb6ea 100644 (file)
@@ -367,7 +367,7 @@ class GeneralUtility {
        static public function cmpIPv4($baseIP, $list) {
                $IPpartsReq = explode('.', $baseIP);
                if (count($IPpartsReq) == 4) {
-                       $values = self::trimExplode(',', $list, 1);
+                       $values = self::trimExplode(',', $list, TRUE);
                        foreach ($values as $test) {
                                $testList = explode('/', $test);
                                if (count($testList) == 2) {
@@ -414,7 +414,7 @@ class GeneralUtility {
                // Policy default: Deny connection
                $success = FALSE;
                $baseIP = self::normalizeIPv6($baseIP);
-               $values = self::trimExplode(',', $list, 1);
+               $values = self::trimExplode(',', $list, TRUE);
                foreach ($values as $test) {
                        $testList = explode('/', $test);
                        if (count($testList) == 2) {
@@ -613,7 +613,7 @@ class GeneralUtility {
                        $baseHostName = $baseHost;
                }
                $baseHostNameParts = explode('.', $baseHostName);
-               $values = self::trimExplode(',', $list, 1);
+               $values = self::trimExplode(',', $list, TRUE);
                foreach ($values as $test) {
                        $hostNameParts = explode('.', $test);
                        // To match hostNameParts can only be shorter (in case of wildcards) or equal
@@ -818,7 +818,7 @@ class GeneralUtility {
                if (isset($secondParameter)) {
                        throw new \InvalidArgumentException('TYPO3 Fatal Error: TYPO3\\CMS\\Core\\Utility\\GeneralUtility::uniqueList() does NOT support more than a single argument value anymore. You have specified more than one!', 1270853886);
                }
-               return implode(',', array_unique(self::trimExplode(',', $in_list, 1)));
+               return implode(',', array_unique(self::trimExplode(',', $in_list, TRUE)));
        }
 
        /**
@@ -1525,7 +1525,7 @@ class GeneralUtility {
         * @return array Output array with selected variables.
         */
        static public function compileSelectedGetVarsFromArray($varList, array $getArray, $GPvarAlt = TRUE) {
-               $keys = self::trimExplode(',', $varList, 1);
+               $keys = self::trimExplode(',', $varList, TRUE);
                $outArr = array();
                foreach ($keys as $v) {
                        if (isset($getArray[$v])) {
@@ -3352,7 +3352,7 @@ Connection: close
                                                REMOTE_ADDR,
                                                REMOTE_HOST,
                                                HTTP_USER_AGENT,
-                                               HTTP_ACCEPT_LANGUAGE', 1);
+                                               HTTP_ACCEPT_LANGUAGE', TRUE);
                                foreach ($envTestVars as $v) {
                                        $out[$v] = self::getIndpEnv($v);
                                }
@@ -3710,7 +3710,7 @@ Connection: close
                if (is_array($uid_or_record)) {
                        $recCopy_temp = array();
                        if ($fields) {
-                               $fieldArr = self::trimExplode(',', $fields, 1);
+                               $fieldArr = self::trimExplode(',', $fields, TRUE);
                                foreach ($fieldArr as $k => $v) {
                                        $recCopy_temp[$k] = $uid_or_record[$v];
                                }
@@ -4298,7 +4298,7 @@ Connection: close
        static public function makeInstanceService($serviceType, $serviceSubType = '', $excludeServiceKeys = array()) {
                $error = FALSE;
                if (!is_array($excludeServiceKeys)) {
-                       $excludeServiceKeys = self::trimExplode(',', $excludeServiceKeys, 1);
+                       $excludeServiceKeys = self::trimExplode(',', $excludeServiceKeys, TRUE);
                }
                $requestInfo = array(
                        'requestedServiceType' => $serviceType,
@@ -4877,7 +4877,7 @@ Connection: close
        static public function arrayToLogString(array $arr, $valueList = array(), $valueLength = 20) {
                $str = '';
                if (!is_array($valueList)) {
-                       $valueList = self::trimExplode(',', $valueList, 1);
+                       $valueList = self::trimExplode(',', $valueList, TRUE);
                }
                $valListCnt = count($valueList);
                foreach ($arr as $key => $value) {
index bf0d99a..10de319 100644 (file)
@@ -490,7 +490,7 @@ class HelpModuleController {
        public function printImage($images, $descr) {
                $code = '';
                // Splitting:
-               $imgArray = \TYPO3\CMS\Core\Utility\GeneralUtility::trimExplode(',', $images, 1);
+               $imgArray = \TYPO3\CMS\Core\Utility\GeneralUtility::trimExplode(',', $images, TRUE);
                if (count($imgArray)) {
                        $descrArray = explode(LF, $descr, count($imgArray));
                        foreach ($imgArray as $k => $image) {
index 746eb49..5eb7cc7 100644 (file)
@@ -263,7 +263,7 @@ class CssStyledContentController extends \TYPO3\CMS\Frontend\Plugin\AbstractPlug
                        }
                        $path = trim($path);
                        // Explode into an array:
-                       $fileArray = GeneralUtility::trimExplode(',', $fileList, 1);
+                       $fileArray = GeneralUtility::trimExplode(',', $fileList, TRUE);
                        // If there were files to list...:
                        if (count($fileArray)) {
                                // Get the descriptions for the files (if any):
index bcc4ac9..85055f3 100644 (file)
@@ -1260,7 +1260,7 @@ class Typo3DbBackend implements \TYPO3\CMS\Extbase\Persistence\Generic\Storage\B
                        $this->pageTSConfigCache[$storagePage] = \TYPO3\CMS\Backend\Utility\BackendUtility::getPagesTSconfig($storagePage);
                }
                if (isset($this->pageTSConfigCache[$storagePage]['TCEMAIN.']['clearCacheCmd'])) {
-                       $clearCacheCommands = \TYPO3\CMS\Core\Utility\GeneralUtility::trimExplode(',', strtolower($this->pageTSConfigCache[$storagePage]['TCEMAIN.']['clearCacheCmd']), 1);
+                       $clearCacheCommands = \TYPO3\CMS\Core\Utility\GeneralUtility::trimExplode(',', strtolower($this->pageTSConfigCache[$storagePage]['TCEMAIN.']['clearCacheCmd']), TRUE);
                        $clearCacheCommands = array_unique($clearCacheCommands);
                        foreach ($clearCacheCommands as $clearCacheCommand) {
                                if (\TYPO3\CMS\Core\Utility\MathUtility::canBeInterpretedAsInteger($clearCacheCommand)) {
index bd05e13..26aeea8 100644 (file)
@@ -1892,7 +1892,7 @@ class ContentObjectRenderer {
         */
        public function fillInMarkerArray(array $markContentArray, array $row, $fieldList = '', $nl2br = TRUE, $prefix = 'FIELD_', $HSC = FALSE) {
                if ($fieldList) {
-                       $fArr = GeneralUtility::trimExplode(',', $fieldList, 1);
+                       $fArr = GeneralUtility::trimExplode(',', $fieldList, TRUE);
                        foreach ($fArr as $field) {
                                $markContentArray['###' . $prefix . $field . '###'] = $nl2br ? nl2br($row[$field], !empty($GLOBALS['TSFE']->xhtmlDoctype)) : $row[$field];
                        }
@@ -4308,7 +4308,7 @@ class ContentObjectRenderer {
                $mimetype = '';
                $mimetypeValue = '';
                if ($fI['extension']) {
-                       $mimeTypes = GeneralUtility::trimExplode(',', $conf['mimeTypes'], 1);
+                       $mimeTypes = GeneralUtility::trimExplode(',', $conf['mimeTypes'], TRUE);
                        foreach ($mimeTypes as $v) {
                                $parts = explode('=', $v, 2);
                                if (strtolower($fI['extension']) == strtolower(trim($parts[0]))) {
@@ -4888,7 +4888,7 @@ class ContentObjectRenderer {
         */
        public function encaps_lineSplit($theValue, $conf) {
                $lParts = explode(LF, $theValue);
-               $encapTags = GeneralUtility::trimExplode(',', strtolower($conf['encapsTagList']), 1);
+               $encapTags = GeneralUtility::trimExplode(',', strtolower($conf['encapsTagList']), TRUE);
                $nonWrappedTag = $conf['nonWrappedTag'];
                $defaultAlign = isset($conf['defaultAlign.']) ? trim($this->stdWrap($conf['defaultAlign'], $conf['defaultAlign.'])) : trim($conf['defaultAlign']);
                if (!strcmp('', $theValue)) {
@@ -5248,7 +5248,7 @@ class ContentObjectRenderer {
                if (!strstr($field, '//')) {
                        return $this->data[trim($field)];
                } else {
-                       $sections = GeneralUtility::trimExplode('//', $field, 1);
+                       $sections = GeneralUtility::trimExplode('//', $field, TRUE);
                        foreach ($sections as $k) {
                                if (strcmp($this->data[$k], '')) {
                                        return $this->data[$k];
@@ -6475,7 +6475,7 @@ class ContentObjectRenderer {
         */
        public function processParams($params) {
                $paramArr = array();
-               $lines = GeneralUtility::trimExplode(LF, $params, 1);
+               $lines = GeneralUtility::trimExplode(LF, $params, TRUE);
                foreach ($lines as $val) {
                        $pair = explode('=', $val, 2);
                        if (!\TYPO3\CMS\Core\Utility\GeneralUtility::inList('#,/', substr(trim($pair[0]), 0, 1))) {
@@ -6963,7 +6963,7 @@ class ContentObjectRenderer {
                unset($dataArr['uid']);
                $uid = intval($uid);
                if ($uid) {
-                       $fieldList = implode(',', GeneralUtility::trimExplode(',', $fieldList, 1));
+                       $fieldList = implode(',', GeneralUtility::trimExplode(',', $fieldList, TRUE));
                        $updateFields = array();
                        foreach ($dataArr as $f => $v) {
                                if (\TYPO3\CMS\Core\Utility\GeneralUtility::inList($fieldList, $f)) {
@@ -7032,7 +7032,7 @@ class ContentObjectRenderer {
                        $dataArr['pid'] = $pid;
                }
                // Set pid < 0 and the dataarr-pid will be used!
-               $fieldList = implode(',', GeneralUtility::trimExplode(',', $fieldList . ',' . $extraList, 1));
+               $fieldList = implode(',', GeneralUtility::trimExplode(',', $fieldList . ',' . $extraList, TRUE));
                $insertFields = array();
                foreach ($dataArr as $f => $v) {
                        if (\TYPO3\CMS\Core\Utility\GeneralUtility::inList($fieldList, $f)) {
@@ -7059,7 +7059,7 @@ class ContentObjectRenderer {
         * @todo Define visibility
         */
        public function DBmayFEUserEdit($table, $row, $feUserRow, $allowedGroups = '', $feEditSelf = 0) {
-               $groupList = $allowedGroups ? implode(',', array_intersect(\TYPO3\CMS\Core\Utility\GeneralUtility::trimExplode(',', $feUserRow['usergroup'], 1), GeneralUtility::trimExplode(',', $allowedGroups, 1))) : $feUserRow['usergroup'];
+               $groupList = $allowedGroups ? implode(',', array_intersect(\TYPO3\CMS\Core\Utility\GeneralUtility::trimExplode(',', $feUserRow['usergroup'], TRUE), GeneralUtility::trimExplode(',', $allowedGroups, TRUE))) : $feUserRow['usergroup'];
                $ok = 0;
                // Points to the field that allows further editing from frontend if not set. If set the record is locked.
                if (!$GLOBALS['TCA'][$table]['ctrl']['fe_admin_lock'] || !$row[$GLOBALS['TCA'][$table]['ctrl']['fe_admin_lock']]) {
@@ -7102,7 +7102,7 @@ class ContentObjectRenderer {
         */
        public function DBmayFEUserEditSelect($table, $feUserRow, $allowedGroups = '', $feEditSelf = 0) {
                // Returns where-definition that selects user-editable records.
-               $groupList = $allowedGroups ? implode(',', array_intersect(\TYPO3\CMS\Core\Utility\GeneralUtility::trimExplode(',', $feUserRow['usergroup'], 1), GeneralUtility::trimExplode(',', $allowedGroups, 1))) : $feUserRow['usergroup'];
+               $groupList = $allowedGroups ? implode(',', array_intersect(\TYPO3\CMS\Core\Utility\GeneralUtility::trimExplode(',', $feUserRow['usergroup'], TRUE), GeneralUtility::trimExplode(',', $allowedGroups, TRUE))) : $feUserRow['usergroup'];
                $OR_arr = array();
                // Points to the field (integer) that holds the fe_users-id of the creator fe_user
                if ($GLOBALS['TCA'][$table]['ctrl']['fe_cruser_id']) {
index e5403d0..0ededa3 100644 (file)
@@ -145,7 +145,7 @@ class TranslationStatusController extends \TYPO3\CMS\Backend\Module\AbstractFunc
                        $tCells[] = '<td class="' . $status . ' c-leftLine">' . $info . '</td>';
                        $tCells[] = '<td class="' . $status . '" title="' . $LANG->getLL('lang_renderl10n_CEcount', '1') . '" align="center">' . $this->getContentElementCount($data['row']['uid'], 0) . '</td>';
                        $modSharedTSconfig = \TYPO3\CMS\Backend\Utility\BackendUtility::getModTSconfig($data['row']['uid'], 'mod.SHARED');
-                       $disableLanguages = isset($modSharedTSconfig['properties']['disableLanguages']) ? \TYPO3\CMS\Core\Utility\GeneralUtility::trimExplode(',', $modSharedTSconfig['properties']['disableLanguages'], 1) : array();
+                       $disableLanguages = isset($modSharedTSconfig['properties']['disableLanguages']) ? \TYPO3\CMS\Core\Utility\GeneralUtility::trimExplode(',', $modSharedTSconfig['properties']['disableLanguages'], TRUE) : array();
                        // Traverse system languages:
                        foreach ($languages as $langRow) {
                                if ($this->pObj->MOD_SETTINGS['lang'] == 0 || (int) $this->pObj->MOD_SETTINGS['lang'] === (int) $langRow['uid']) {
index 9737789..20f7184 100644 (file)
@@ -2565,13 +2565,13 @@ class TypoScriptFrontendController {
                        }
                }
                // Setting softMergeIfNotBlank:
-               $table_fields = GeneralUtility::trimExplode(',', $this->config['config']['sys_language_softMergeIfNotBlank'], 1);
+               $table_fields = GeneralUtility::trimExplode(',', $this->config['config']['sys_language_softMergeIfNotBlank'], TRUE);
                foreach ($table_fields as $TF) {
                        list($tN, $fN) = explode(':', $TF);
                        $GLOBALS['TCA'][$tN]['columns'][$fN]['l10n_mode'] = 'mergeIfNotBlank';
                }
                // Setting softExclude:
-               $table_fields = GeneralUtility::trimExplode(',', $this->config['config']['sys_language_softExclude'], 1);
+               $table_fields = GeneralUtility::trimExplode(',', $this->config['config']['sys_language_softExclude'], TRUE);
                foreach ($table_fields as $TF) {
                        list($tN, $fN) = explode(':', $TF);
                        $GLOBALS['TCA'][$tN]['columns'][$fN]['l10n_mode'] = 'exclude';
index d64cc1a..1d922ca 100644 (file)
@@ -56,7 +56,7 @@ class PageGenerator {
                        unset($temp_copy_TSFE);
                }
                if ($GLOBALS['TSFE']->config['config']['MP_defaults']) {
-                       $temp_parts = GeneralUtility::trimExplode('|', $GLOBALS['TSFE']->config['config']['MP_defaults'], 1);
+                       $temp_parts = GeneralUtility::trimExplode('|', $GLOBALS['TSFE']->config['config']['MP_defaults'], TRUE);
                        foreach ($temp_parts as $temp_p) {
                                list($temp_idP, $temp_MPp) = explode(':', $temp_p, 2);
                                $temp_ids = GeneralUtility::intExplode(',', $temp_idP);
@@ -487,7 +487,7 @@ class PageGenerator {
                                }
                        }
                        if ($GLOBALS['TSFE']->pSetup['insertClassesFromRTE.']['add_mainStyleOverrideDefs'] && is_array($pageTSConfig['RTE.']['default.']['mainStyleOverride_add.'])) {
-                               $mSOa_tList = GeneralUtility::trimExplode(',', strtoupper($GLOBALS['TSFE']->pSetup['insertClassesFromRTE.']['add_mainStyleOverrideDefs']), 1);
+                               $mSOa_tList = GeneralUtility::trimExplode(',', strtoupper($GLOBALS['TSFE']->pSetup['insertClassesFromRTE.']['add_mainStyleOverrideDefs']), TRUE);
                                foreach ($pageTSConfig['RTE.']['default.']['mainStyleOverride_add.'] as $mSOa_key => $mSOa_value) {
                                        if (!is_array($mSOa_value) && (in_array('*', $mSOa_tList) || in_array($mSOa_key, $mSOa_tList))) {
                                                $style .= '
index 98aa707..f6d8bc1 100644 (file)
@@ -1109,7 +1109,7 @@ class AbstractPlugin {
                        $pid_list = $GLOBALS['TSFE']->id;
                }
                $recursive = \TYPO3\CMS\Core\Utility\MathUtility::forceIntegerInRange($recursive, 0);
-               $pid_list_arr = array_unique(GeneralUtility::trimExplode(',', $pid_list, 1));
+               $pid_list_arr = array_unique(GeneralUtility::trimExplode(',', $pid_list, TRUE));
                $pid_list = array();
                foreach ($pid_list_arr as $val) {
                        $val = \TYPO3\CMS\Core\Utility\MathUtility::forceIntegerInRange($val, 0);
@@ -1132,7 +1132,7 @@ class AbstractPlugin {
         * @todo Define visibility
         */
        public function pi_prependFieldsWithTable($table, $fieldList) {
-               $list = GeneralUtility::trimExplode(',', $fieldList, 1);
+               $list = GeneralUtility::trimExplode(',', $fieldList, TRUE);
                $return = array();
                foreach ($list as $listItem) {
                        $return[] = $table . '.' . $listItem;
@@ -1178,7 +1178,7 @@ class AbstractPlugin {
         */
        public function pi_isOnlyFields($fList, $lowerThan = -1) {
                $lowerThan = $lowerThan == -1 ? $this->pi_lowerThan : $lowerThan;
-               $fList = GeneralUtility::trimExplode(',', $fList, 1);
+               $fList = GeneralUtility::trimExplode(',', $fList, TRUE);
                $tempPiVars = $this->piVars;
                foreach ($fList as $k) {
                        if (!\TYPO3\CMS\Core\Utility\MathUtility::canBeInterpretedAsInteger($tempPiVars[$k]) || $tempPiVars[$k] < $lowerThan) {
index 73b2895..6f9b19b 100644 (file)
@@ -2821,7 +2821,7 @@ class ImportExport {
        public function checkDokType($checkTable, $doktype) {
                global $PAGES_TYPES;
                $allowedTableList = isset($PAGES_TYPES[$doktype]['allowedTables']) ? $PAGES_TYPES[$doktype]['allowedTables'] : $PAGES_TYPES['default']['allowedTables'];
-               $allowedArray = GeneralUtility::trimExplode(',', $allowedTableList, 1);
+               $allowedArray = GeneralUtility::trimExplode(',', $allowedTableList, TRUE);
                // If all tables or the table is listed as a allowed type, return TRUE
                if (strstr($allowedTableList, '*') || in_array($checkTable, $allowedArray)) {
                        return TRUE;
index 2dda849..e1020c7 100644 (file)
@@ -545,7 +545,7 @@ class IndexedPagesController extends \TYPO3\CMS\Backend\Module\AbstractFunctionM
         */
        public function listWords($ftrows, $header, $stopWordBoxes = FALSE, $page = '') {
                // Prepare keywords:
-               $keywords = is_array($page) ? array_flip(GeneralUtility::trimExplode(',', $page['keywords'], 1)) : '';
+               $keywords = is_array($page) ? array_flip(GeneralUtility::trimExplode(',', $page['keywords'], TRUE)) : '';
                // Render list:
                $trows = '';
                $trows .= '
@@ -969,7 +969,7 @@ class IndexedPagesController extends \TYPO3\CMS\Backend\Module\AbstractFunctionM
                        $phashRows = $this->allPhashListed;
                        $this->allPhashListed = array();
                } else {
-                       $phashRows = GeneralUtility::trimExplode(',', $phashList, 1);
+                       $phashRows = GeneralUtility::trimExplode(',', $phashList, TRUE);
                }
                foreach ($phashRows as $phash) {
                        $phash = intval($phash);
@@ -1049,7 +1049,7 @@ class IndexedPagesController extends \TYPO3\CMS\Backend\Module\AbstractFunctionM
        public function processPageKeywords($pageKeywords, $pageUid) {
                // Get pages current keywords
                $pageRec = \TYPO3\CMS\Backend\Utility\BackendUtility::getRecord('pages', $pageUid);
-               $keywords = array_flip(GeneralUtility::trimExplode(',', $pageRec['keywords'], 1));
+               $keywords = array_flip(GeneralUtility::trimExplode(',', $pageRec['keywords'], TRUE));
                // Merge keywords:
                foreach ($pageKeywords as $key => $v) {
                        if ($v) {
index a2d95c6..082aa80 100644 (file)
@@ -319,7 +319,7 @@ class SearchFormController extends \TYPO3\CMS\Frontend\Plugin\AbstractPlugin {
                }
                // Add media to search in:
                if (strlen(trim($this->conf['search.']['mediaList']))) {
-                       $mediaList = implode(',', GeneralUtility::trimExplode(',', $this->conf['search.']['mediaList'], 1));
+                       $mediaList = implode(',', GeneralUtility::trimExplode(',', $this->conf['search.']['mediaList'], TRUE));
                }
                foreach ($this->external_parsers as $extension => $obj) {
                        // Skip unwanted extensions
index b56c9e1..b50c4c3 100644 (file)
@@ -96,7 +96,7 @@ class FileContentParser {
                $extOK = FALSE;
                $mainExtension = '';
                // Ignore extensions
-               $ignoreExtensions = \TYPO3\CMS\Core\Utility\GeneralUtility::trimExplode(',', strtolower($indexerConfig['ignoreExtensions']), 1);
+               $ignoreExtensions = \TYPO3\CMS\Core\Utility\GeneralUtility::trimExplode(',', strtolower($indexerConfig['ignoreExtensions']), TRUE);
                if (in_array($extension, $ignoreExtensions)) {
                        $this->pObj->log_setTSlogMessage(sprintf($this->sL('LLL:EXT:indexed_search/locallang.xlf:ignoreExtensions'), $extension), 1);
                        return FALSE;
@@ -305,7 +305,7 @@ class FileContentParser {
                // Read indexer-config
                $indexerConfig = unserialize($GLOBALS['TYPO3_CONF_VARS']['EXT']['extConf']['indexed_search']);
                // Ignore extensions
-               $ignoreExtensions = \TYPO3\CMS\Core\Utility\GeneralUtility::trimExplode(',', strtolower($indexerConfig['ignoreExtensions']), 1);
+               $ignoreExtensions = \TYPO3\CMS\Core\Utility\GeneralUtility::trimExplode(',', strtolower($indexerConfig['ignoreExtensions']), TRUE);
                if (in_array($extension, $ignoreExtensions)) {
                        return FALSE;
                }
index 7daaee0..84cb3db 100644 (file)
@@ -303,7 +303,7 @@ class CrawlerHook {
                        } elseif (@is_dir($readpath)) {
                                // If dir, read content and create new pending items for log:
                                // Select files and directories in path:
-                               $extList = implode(',', GeneralUtility::trimExplode(',', $cfgRec['extensions'], 1));
+                               $extList = implode(',', GeneralUtility::trimExplode(',', $cfgRec['extensions'], TRUE));
                                $fileArr = array();
                                $files = GeneralUtility::getAllFilesAndFoldersInPath($fileArr, $readpath, $extList, 0, 0);
                                $directoryList = GeneralUtility::get_dirs($readpath);
@@ -547,7 +547,7 @@ class CrawlerHook {
                $this->loadIndexerClass();
                // Init:
                $rl = is_array($rl) ? $rl : $this->getUidRootLineForClosestTemplate($cfgRec['pid']);
-               $fieldList = GeneralUtility::trimExplode(',', $cfgRec['fieldlist'], 1);
+               $fieldList = GeneralUtility::trimExplode(',', $cfgRec['fieldlist'], TRUE);
                $languageField = $GLOBALS['TCA'][$cfgRec['table2index']]['ctrl']['languageField'];
                $sys_language_uid = $languageField ? $r[$languageField] : 0;
                // (Re)-Indexing a row from a table:
@@ -642,7 +642,7 @@ class CrawlerHook {
         */
        public function checkDeniedSuburls($url, $url_deny) {
                if (trim($url_deny)) {
-                       $url_denyArray = GeneralUtility::trimExplode(LF, $url_deny, 1);
+                       $url_denyArray = GeneralUtility::trimExplode(LF, $url_deny, TRUE);
                        foreach ($url_denyArray as $testurl) {
                                if (GeneralUtility::isFirstPartOfStr($url, $testurl)) {
                                        echo $url . ' /// ' . $url_deny . LF;
@@ -763,4 +763,4 @@ class CrawlerHook {
 }
 
 
-?>
\ No newline at end of file
+?>
index d8eca63..26265a7 100644 (file)
@@ -930,7 +930,7 @@ class Indexer {
                $content = GeneralUtility::getUrl($url, 2);
                if (strlen($content)) {
                        // Compile headers:
-                       $headers = GeneralUtility::trimExplode(LF, $content, 1);
+                       $headers = GeneralUtility::trimExplode(LF, $content, TRUE);
                        $retVal = array();
                        foreach ($headers as $line) {
                                if (!strlen(trim($line))) {
index 5080394..7117813 100644 (file)
@@ -73,7 +73,7 @@ class SqlSchemaMigrationService {
         * @return array Array with information about table.
         */
        public function getFieldDefinitions_fileContent($fileContent) {
-               $lines = \TYPO3\CMS\Core\Utility\GeneralUtility::trimExplode(LF, $fileContent, 1);
+               $lines = \TYPO3\CMS\Core\Utility\GeneralUtility::trimExplode(LF, $fileContent, TRUE);
                $table = '';
                $total = array();
                foreach ($lines as $value) {
index d1c44dd..db6806a 100644 (file)
@@ -595,7 +595,7 @@ class LinkValidatorReport extends \TYPO3\CMS\Backend\Module\AbstractFunctionModu
                } else {
                        $markerArray['total_count'] = $brokenLinkOverView['brokenlinkCount'];
                }
-               $linktypes = GeneralUtility::trimExplode(',', $this->modTS['linktypes'], 1);
+               $linktypes = GeneralUtility::trimExplode(',', $this->modTS['linktypes'], TRUE);
                $hookSectionContent = '';
                if (is_array($linktypes)) {
                        if (!empty($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['linkvalidator']['checkLinks'])
index 7ff899d..5ffd8da 100644 (file)
@@ -261,7 +261,7 @@ class ValidatorTask extends \TYPO3\CMS\Scheduler\Task\AbstractTask {
                $html = array();
                $pageSections = '';
                $this->isDifferentToLastRun = FALSE;
-               $pageList = GeneralUtility::trimExplode(',', $this->page, 1);
+               $pageList = GeneralUtility::trimExplode(',', $this->page, TRUE);
                $modTs = $this->loadModTsConfig($this->page);
                if (is_array($pageList)) {
                        foreach ($pageList as $page) {
@@ -374,7 +374,7 @@ class ValidatorTask extends \TYPO3\CMS\Scheduler\Task\AbstractTask {
         */
        protected function getLinkTypes(array $modTS) {
                $linkTypes = array();
-               $typesTmp = GeneralUtility::trimExplode(',', $modTS['linktypes'], 1);
+               $typesTmp = GeneralUtility::trimExplode(',', $modTS['linktypes'], TRUE);
                if (is_array($typesTmp)) {
                        if (!empty($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['linkvalidator']['checkLinks']) && is_array($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['linkvalidator']['checkLinks'])) {
                                foreach ($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['linkvalidator']['checkLinks'] as $type => $value) {
index f3ee0b4..b71555d 100644 (file)
@@ -103,7 +103,7 @@ Will report lost files.';
                $fileArr = array();
                $fileArr = \TYPO3\CMS\Core\Utility\GeneralUtility::getAllFilesAndFoldersInPath($fileArr, PATH_site . 'uploads/');
                $fileArr = \TYPO3\CMS\Core\Utility\GeneralUtility::removePrefixPathFromList($fileArr, PATH_site);
-               $excludePaths = \TYPO3\CMS\Core\Utility\GeneralUtility::trimExplode(',', $this->cli_argValue('--excludePath', 0), 1);
+               $excludePaths = \TYPO3\CMS\Core\Utility\GeneralUtility::trimExplode(',', $this->cli_argValue('--excludePath', 0), TRUE);
                // Traverse files and for each, look up if its found in the reference index.
                foreach ($fileArr as $key => $value) {
                        $include = TRUE;
index 9002748..cce0790 100644 (file)
@@ -708,7 +708,7 @@ class ElementBrowser {
                // Starting content:
                $content = $this->doc->startPage('RTE link');
                // Initializing the action value, possibly removing blinded values etc:
-               $allowedItems = array_diff(explode(',', 'page,file,folder,url,mail,spec'), GeneralUtility::trimExplode(',', $this->thisConfig['blindLinkOptions'], 1));
+               $allowedItems = array_diff(explode(',', 'page,file,folder,url,mail,spec'), GeneralUtility::trimExplode(',', $this->thisConfig['blindLinkOptions'], TRUE));
                $allowedItems = array_diff($allowedItems, GeneralUtility::trimExplode(',', $this->P['params']['blindLinkOptions']));
                // Call hook for extra options
                foreach ($this->hookObjects as $hookObject) {
@@ -1411,7 +1411,7 @@ class ElementBrowser {
                        if (!strcmp(trim($tables), '*')) {
                                $tablesArr = array_keys($GLOBALS['TCA']);
                        } else {
-                               $tablesArr = GeneralUtility::trimExplode(',', $tables, 1);
+                               $tablesArr = GeneralUtility::trimExplode(',', $tables, TRUE);
                        }
                        reset($tablesArr);
                        // Headline for selecting records:
index 409808a..caada2b 100644 (file)
@@ -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++;
index 16ec42c..e843c75 100644 (file)
@@ -295,7 +295,7 @@ class DatabaseRecordList extends \TYPO3\CMS\Recordlist\RecordList\AbstractDataba
                        )';
                }
                // Cleaning up:
-               $this->fieldArray = array_unique(array_merge($this->fieldArray, GeneralUtility::trimExplode(',', $rowlist, 1)));
+               $this->fieldArray = array_unique(array_merge($this->fieldArray, GeneralUtility::trimExplode(',', $rowlist, TRUE)));
                if ($this->noControlPanels) {
                        $tempArray = array_flip($this->fieldArray);
                        unset($tempArray['_CONTROL_']);
@@ -337,7 +337,7 @@ class DatabaseRecordList extends \TYPO3\CMS\Recordlist\RecordList\AbstractDataba
                        $selectFields[] = $GLOBALS['TCA'][$table]['ctrl']['transOrigPointerField'];
                }
                if ($GLOBALS['TCA'][$table]['ctrl']['label_alt']) {
-                       $selectFields = array_merge($selectFields, GeneralUtility::trimExplode(',', $GLOBALS['TCA'][$table]['ctrl']['label_alt'], 1));
+                       $selectFields = array_merge($selectFields, GeneralUtility::trimExplode(',', $GLOBALS['TCA'][$table]['ctrl']['label_alt'], TRUE));
                }
                // Unique list!
                $selectFields = array_unique($selectFields);
index ea123d8..6ec66a3 100644 (file)
@@ -200,7 +200,7 @@ class BrowseLinks extends \TYPO3\CMS\Recordlist\Browser\ElementBrowser {
                $classSelected = array();
                if ($this->buttonConfig['properties.']['class.']['allowedClasses']) {
                        $this->setClass = $this->curUrlArray['class'];
-                       $classesAnchorArray = GeneralUtility::trimExplode(',', $this->buttonConfig['properties.']['class.']['allowedClasses'], 1);
+                       $classesAnchorArray = GeneralUtility::trimExplode(',', $this->buttonConfig['properties.']['class.']['allowedClasses'], TRUE);
                        $classesAnchorConfigArray = array();
                        // Collecting allowed classes and configured default values
                        $classesAnchor = array();
@@ -264,7 +264,7 @@ class BrowseLinks extends \TYPO3\CMS\Recordlist\Browser\ElementBrowser {
                }
                // Initializing additional attributes
                if ($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['rtehtmlarea']['plugins']['TYPO3Link']['additionalAttributes']) {
-                       $addAttributes = GeneralUtility::trimExplode(',', $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['rtehtmlarea']['plugins']['TYPO3Link']['additionalAttributes'], 1);
+                       $addAttributes = GeneralUtility::trimExplode(',', $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['rtehtmlarea']['plugins']['TYPO3Link']['additionalAttributes'], TRUE);
                        foreach ($addAttributes as $attribute) {
                                $this->additionalAttributes[$attribute] = isset($this->curUrlArray[$attribute]) ? $this->curUrlArray[$attribute] : '';
                        }
@@ -445,7 +445,7 @@ class BrowseLinks extends \TYPO3\CMS\Recordlist\Browser\ElementBrowser {
                }
                // Removing items as per configuration
                if (is_array($this->buttonConfig['options.']) && $this->buttonConfig['options.']['removeItems']) {
-                       $this->allowedItems = array_diff($this->allowedItems, GeneralUtility::trimExplode(',', $this->buttonConfig['options.']['removeItems'], 1));
+                       $this->allowedItems = array_diff($this->allowedItems, GeneralUtility::trimExplode(',', $this->buttonConfig['options.']['removeItems'], TRUE));
                }
                reset($this->allowedItems);
                if (!in_array($this->act, $this->allowedItems)) {
index 3d39b28..a233ce7 100644 (file)
@@ -177,8 +177,8 @@ class SpellCheckingController {
                }
                // Setting the list of dictionaries
                $dictionaryList = shell_exec($this->AspellDirectory . ' dump dicts');
-               $dictionaryList = implode(',', GeneralUtility::trimExplode(LF, $dictionaryList, 1));
-               $dictionaryArray = GeneralUtility::trimExplode(',', $dictionaryList, 1);
+               $dictionaryList = implode(',', GeneralUtility::trimExplode(LF, $dictionaryList, TRUE));
+               $dictionaryArray = GeneralUtility::trimExplode(',', $dictionaryList, TRUE);
                $restrictToDictionaries = GeneralUtility::_POST('restrictToDictionaries');
                if ($restrictToDictionaries) {
                        $dictionaryArray = array_intersect($dictionaryArray, GeneralUtility::trimExplode(',', $restrictToDictionaries, 1));
@@ -604,7 +604,7 @@ var selectedDictionary = "' . $this->dictionary . '";
                                        $AspellCommand = $catCommand . ' ' . escapeshellarg($tmpFileName) . ' | ' . $this->AspellDirectory . ' -a check --mode=none --sug-mode=' . escapeshellarg($this->pspellMode) . ($this->personalDictionaryPath ? ' --home-dir=' . escapeshellarg($this->personalDictionaryPath) : '') . ' --lang=' . escapeshellarg($this->dictionary) . ' --encoding=' . escapeshellarg($this->aspellEncoding) . ' 2>&1';
                                        $AspellAnswer = shell_exec($AspellCommand);
                                        $AspellResultLines = array();
-                                       $AspellResultLines = GeneralUtility::trimExplode(LF, $AspellAnswer, 1);
+                                       $AspellResultLines = GeneralUtility::trimExplode(LF, $AspellAnswer, TRUE);
                                        if (substr($AspellResultLines[0], 0, 6) == 'Error:') {
                                                echo '{' . $AspellAnswer . '}';
                                        }
@@ -617,8 +617,8 @@ var selectedDictionary = "' . $this->dictionary . '";
                                                        $suggest = array();
                                                        $suggestions = array();
                                                        if (substr($AspellResultLines['1'], 0, 1) == '&') {
-                                                               $suggestions = GeneralUtility::trimExplode(':', $AspellResultLines['1'], 1);
-                                                               $suggest = GeneralUtility::trimExplode(',', $suggestions['1'], 1);
+                                                               $suggestions = GeneralUtility::trimExplode(':', $AspellResultLines['1'], TRUE);
+                                                               $suggest = GeneralUtility::trimExplode(',', $suggestions['1'], TRUE);
                                                        }
                                                        if (sizeof($suggest) != 0) {
                                                                $this->suggestionCount++;
index a7423f9..4fe83be 100644 (file)
@@ -139,7 +139,7 @@ class Acronym extends \TYPO3\CMS\Rtehtmlarea\RteHtmlAreaApi {
                        $perms_clause = $GLOBALS['BE_USER']->getPagePermsClause(1);
                        $recursive = isset($this->thisConfig['buttons.'][$button . '.']['recursive']) ? intval($this->thisConfig['buttons.'][$button . '.']['recursive']) : 0;
                        if (trim($this->thisConfig['buttons.'][$button . '.']['pages'])) {
-                               $pids = \TYPO3\CMS\Core\Utility\GeneralUtility::trimExplode(',', $this->thisConfig['buttons.'][$button . '.']['pages'], 1);
+                               $pids = \TYPO3\CMS\Core\Utility\GeneralUtility::trimExplode(',', $this->thisConfig['buttons.'][$button . '.']['pages'], TRUE);
                                foreach ($pids as $key => $val) {
                                        if (!$GLOBALS['BE_USER']->isInWebMount($val, $perms_clause)) {
                                                unset($pids[$key]);
index 9e253f4..2d6a393 100644 (file)
@@ -123,16 +123,16 @@ class BlockElements extends \TYPO3\CMS\Rtehtmlarea\RteHtmlAreaApi {
                                        if ($this->htmlAreaRTE->cleanList($this->thisConfig['buttons.']['formatblock.']['removeItems']) == '*') {
                                                $hideItems = array_diff(array_keys($defaultBlockElements), array('none'));
                                        } else {
-                                               $hideItems = \TYPO3\CMS\Core\Utility\GeneralUtility::trimExplode(',', $this->htmlAreaRTE->cleanList(\TYPO3\CMS\Core\Utility\GeneralUtility::strtolower($this->thisConfig['buttons.']['formatblock.']['removeItems'])), 1);
+                                               $hideItems = \TYPO3\CMS\Core\Utility\GeneralUtility::trimExplode(',', $this->htmlAreaRTE->cleanList(\TYPO3\CMS\Core\Utility\GeneralUtility::strtolower($this->thisConfig['buttons.']['formatblock.']['removeItems'])), TRUE);
                                        }
                                }
                                // Adding elements
                                if ($this->thisConfig['buttons.']['formatblock.']['addItems']) {
-                                       $addItems = \TYPO3\CMS\Core\Utility\GeneralUtility::trimExplode(',', $this->htmlAreaRTE->cleanList(\TYPO3\CMS\Core\Utility\GeneralUtility::strtolower($this->thisConfig['buttons.']['formatblock.']['addItems'])), 1);
+                                       $addItems = \TYPO3\CMS\Core\Utility\GeneralUtility::trimExplode(',', $this->htmlAreaRTE->cleanList(\TYPO3\CMS\Core\Utility\GeneralUtility::strtolower($this->thisConfig['buttons.']['formatblock.']['addItems'])), TRUE);
                                }
                                // Restriction clause
                                if ($this->thisConfig['buttons.']['formatblock.']['restrictToItems']) {
-                                       $restrictTo = \TYPO3\CMS\Core\Utility\GeneralUtility::trimExplode(',', $this->htmlAreaRTE->cleanList('none,' . \TYPO3\CMS\Core\Utility\GeneralUtility::strtolower($this->thisConfig['buttons.']['formatblock.']['restrictToItems'])), 1);
+                                       $restrictTo = \TYPO3\CMS\Core\Utility\GeneralUtility::trimExplode(',', $this->htmlAreaRTE->cleanList('none,' . \TYPO3\CMS\Core\Utility\GeneralUtility::strtolower($this->thisConfig['buttons.']['formatblock.']['restrictToItems'])), TRUE);
                                }
                                // Elements order
                                if ($this->thisConfig['buttons.']['formatblock.']['orderItems']) {
@@ -142,7 +142,7 @@ class BlockElements extends \TYPO3\CMS\Rtehtmlarea\RteHtmlAreaApi {
                                $postfixLabelWithTag = $this->thisConfig['buttons.']['formatblock.']['postfixLabelWithTag'] ? TRUE : $postfixLabelWithTag;
                        }
                        // Adding custom items
-                       $blockElementsOrder = array_merge(\TYPO3\CMS\Core\Utility\GeneralUtility::trimExplode(',', $this->htmlAreaRTE->cleanList($blockElementsOrder), 1), $addItems);
+                       $blockElementsOrder = array_merge(\TYPO3\CMS\Core\Utility\GeneralUtility::trimExplode(',', $this->htmlAreaRTE->cleanList($blockElementsOrder), TRUE), $addItems);
                        // Add div element if indent is configured in the toolbar
                        if (in_array('indent', $this->toolbar) || in_array('outdent', $this->toolbar)) {
                                $blockElementsOrder = array_merge($blockElementsOrder, array('div'));
index 3c58d97..1fe8fa8 100644 (file)
@@ -76,11 +76,11 @@ class ContextMenu extends \TYPO3\CMS\Rtehtmlarea\RteHtmlAreaApi {
        RTEarea[' . $editorId . '].contextMenu =  ' . $this->htmlAreaRTE->buildNestedJSArray($this->thisConfig['contextMenu.']) . ';';
                        if ($this->thisConfig['contextMenu.']['showButtons']) {
                                $registerRTEinJavascriptString .= '
-       RTEarea[' . $editorId . '].contextMenu.showButtons = ' . json_encode(\TYPO3\CMS\Core\Utility\GeneralUtility::trimExplode(',', $this->htmlAreaRTE->cleanList(\TYPO3\CMS\Core\Utility\GeneralUtility::strtolower($this->thisConfig['contextMenu.']['showButtons'])), 1)) . ';';
+       RTEarea[' . $editorId . '].contextMenu.showButtons = ' . json_encode(\TYPO3\CMS\Core\Utility\GeneralUtility::trimExplode(',', $this->htmlAreaRTE->cleanList(\TYPO3\CMS\Core\Utility\GeneralUtility::strtolower($this->thisConfig['contextMenu.']['showButtons'])), TRUE)) . ';';
                        }
                        if ($this->thisConfig['contextMenu.']['hideButtons']) {
                                $registerRTEinJavascriptString .= '
-       RTEarea[' . $editorId . '].contextMenu.hideButtons = ' . json_encode(\TYPO3\CMS\Core\Utility\GeneralUtility::trimExplode(',', $this->htmlAreaRTE->cleanList(\TYPO3\CMS\Core\Utility\GeneralUtility::strtolower($this->thisConfig['contextMenu.']['hideButtons'])), 1)) . ';';
+       RTEarea[' . $editorId . '].contextMenu.hideButtons = ' . json_encode(\TYPO3\CMS\Core\Utility\GeneralUtility::trimExplode(',', $this->htmlAreaRTE->cleanList(\TYPO3\CMS\Core\Utility\GeneralUtility::strtolower($this->thisConfig['contextMenu.']['hideButtons'])), TRUE)) . ';';
                        }
                }
                return $registerRTEinJavascriptString;
index adc4465..e0fe135 100644 (file)
@@ -72,7 +72,7 @@ class CopyPaste extends \TYPO3\CMS\Rtehtmlarea\RteHtmlAreaApi {
                $enabled = parent::main($parentObject);
                // Hiding some buttons
                if ($enabled && is_array($this->hideButtonsFromClient[$this->htmlAreaRTE->client['browser']])) {
-                       $this->pluginButtons = implode(',', array_diff(\TYPO3\CMS\Core\Utility\GeneralUtility::trimExplode(',', $this->pluginButtons, 1), $this->hideButtonsFromClient[$this->htmlAreaRTE->client['browser']]));
+                       $this->pluginButtons = implode(',', array_diff(\TYPO3\CMS\Core\Utility\GeneralUtility::trimExplode(',', $this->pluginButtons, TRUE), $this->hideButtonsFromClient[$this->htmlAreaRTE->client['browser']]));
                }
                // Force enabling the plugin even if no button remains in the tool bar, so that hot keys still are enabled
                $this->pluginAddsButtons = FALSE;
index 3005f8b..571a8b8 100644 (file)
@@ -92,7 +92,7 @@ class DefinitionList extends \TYPO3\CMS\Rtehtmlarea\RteHtmlAreaApi {
         */
        public function applyToolbarConstraints($show) {
                $blockElementsButtons = 'formatblock, indent, outdent, blockquote, insertparagraphbefore, insertparagraphafter, left, center, right, justifyfull, orderedlist, unorderedlist';
-               $notRemoved = array_intersect(\TYPO3\CMS\Core\Utility\GeneralUtility::trimExplode(',', $blockElementsButtons, 1), $show);
+               $notRemoved = array_intersect(\TYPO3\CMS\Core\Utility\GeneralUtility::trimExplode(',', $blockElementsButtons, TRUE), $show);
                // DefinitionList plugin requires BlockElements plugin
                // We will not allow any definition lists operations if all block elements buttons were disabled
                if (empty($notRemoved)) {
index 482faac..dad31c2 100644 (file)
@@ -161,13 +161,13 @@ class InlineElements extends \TYPO3\CMS\Rtehtmlarea\RteHtmlAreaApi {
                        if (is_array($this->thisConfig['buttons.']) && is_array($this->thisConfig['buttons.']['formattext.'])) {
                                // Removing elements
                                if ($this->thisConfig['buttons.']['formattext.']['removeItems']) {
-                                       $hideItems = \TYPO3\CMS\Core\Utility\GeneralUtility::trimExplode(',', $this->htmlAreaRTE->cleanList($this->thisConfig['buttons.']['formattext.']['removeItems']), 1);
+                                       $hideItems = \TYPO3\CMS\Core\Utility\GeneralUtility::trimExplode(',', $this->htmlAreaRTE->cleanList($this->thisConfig['buttons.']['formattext.']['removeItems']), TRUE);
                                }
                                // Restriction clause
                                if ($this->thisConfig['buttons.']['formattext.']['restrictTo']) {
-                                       $restrictTo = \TYPO3\CMS\Core\Utility\GeneralUtility::trimExplode(',', $this->htmlAreaRTE->cleanList('none,' . $this->thisConfig['buttons.']['formattext.']['restrictTo']), 1);
+                                       $restrictTo = \TYPO3\CMS\Core\Utility\GeneralUtility::trimExplode(',', $this->htmlAreaRTE->cleanList('none,' . $this->thisConfig['buttons.']['formattext.']['restrictTo']), TRUE);
                                } elseif ($this->thisConfig['buttons.']['formattext.']['restrictToItems']) {
-                                       $restrictTo = \TYPO3\CMS\Core\Utility\GeneralUtility::trimExplode(',', $this->htmlAreaRTE->cleanList('none,' . $this->thisConfig['buttons.']['formattext.']['restrictToItems']), 1);
+                                       $restrictTo = \TYPO3\CMS\Core\Utility\GeneralUtility::trimExplode(',', $this->htmlAreaRTE->cleanList('none,' . $this->thisConfig['buttons.']['formattext.']['restrictToItems']), TRUE);
                                }
                                // Elements order
                                if ($this->thisConfig['buttons.']['formattext.']['orderItems']) {
@@ -176,7 +176,7 @@ class InlineElements extends \TYPO3\CMS\Rtehtmlarea\RteHtmlAreaApi {
                                $prefixLabelWithTag = $this->thisConfig['buttons.']['formattext.']['prefixLabelWithTag'] ? TRUE : $prefixLabelWithTag;
                                $postfixLabelWithTag = $this->thisConfig['buttons.']['formattext.']['postfixLabelWithTag'] ? TRUE : $postfixLabelWithTag;
                        }
-                       $inlineElementsOrder = array_diff(\TYPO3\CMS\Core\Utility\GeneralUtility::trimExplode(',', $this->htmlAreaRTE->cleanList($inlineElementsOrder), 1), $hideItems);
+                       $inlineElementsOrder = array_diff(\TYPO3\CMS\Core\Utility\GeneralUtility::trimExplode(',', $this->htmlAreaRTE->cleanList($inlineElementsOrder), TRUE), $hideItems);
                        if (!in_array('*', $restrictTo)) {
                                $inlineElementsOrder = array_intersect($inlineElementsOrder, $restrictTo);
                        }
index 9c0c87b..d489ca2 100644 (file)
@@ -131,7 +131,7 @@ class SelectFont extends \TYPO3\CMS\Rtehtmlarea\RteHtmlAreaApi {
                                $hideItems = $this->thisConfig['buttons.'][$buttonId . '.']['removeItems'];
                        }
                        if ($this->thisConfig['buttons.'][$buttonId . '.']['addItems']) {
-                               $addItems = \TYPO3\CMS\Core\Utility\GeneralUtility::trimExplode(',', $this->htmlAreaRTE->cleanList($this->thisConfig['buttons.'][$buttonId . '.']['addItems']), 1);
+                               $addItems = \TYPO3\CMS\Core\Utility\GeneralUtility::trimExplode(',', $this->htmlAreaRTE->cleanList($this->thisConfig['buttons.'][$buttonId . '.']['addItems']), TRUE);
                        }
                }
                // Initializing the items array
index 14638eb..6aae5f9 100644 (file)
@@ -118,7 +118,7 @@ abstract class RteHtmlAreaApi {
         */
        public function addButtonsToToolbar() {
                //Add only buttons not yet in the default toolbar order
-               $addButtons = implode(',', array_diff(\TYPO3\CMS\Core\Utility\GeneralUtility::trimExplode(',', $this->pluginButtons, 1), \TYPO3\CMS\Core\Utility\GeneralUtility::trimExplode(',', $this->htmlAreaRTE->defaultToolbarOrder, 1)));
+               $addButtons = implode(',', array_diff(\TYPO3\CMS\Core\Utility\GeneralUtility::trimExplode(',', $this->pluginButtons, TRUE), \TYPO3\CMS\Core\Utility\GeneralUtility::trimExplode(',', $this->htmlAreaRTE->defaultToolbarOrder, TRUE)));
                return ($addButtons ? 'bar,' . $addButtons . ',linebreak,' : '') . $this->htmlAreaRTE->defaultToolbarOrder;
        }
 
@@ -145,7 +145,7 @@ abstract class RteHtmlAreaApi {
        public function buildJavascriptConfiguration($RTEcounter) {
                global $TSFE, $LANG;
                $registerRTEinJavascriptString = '';
-               $pluginButtons = \TYPO3\CMS\Core\Utility\GeneralUtility::trimExplode(',', $this->pluginButtons, 1);
+               $pluginButtons = \TYPO3\CMS\Core\Utility\GeneralUtility::trimExplode(',', $this->pluginButtons, TRUE);
                foreach ($pluginButtons as $button) {
                        if (in_array($button, $this->toolbar)) {
                                if (!is_array($this->thisConfig['buttons.']) || !is_array($this->thisConfig['buttons.'][($button . '.')])) {
index 8c1f652..ce74927 100644 (file)
@@ -633,14 +633,14 @@ class RteHtmlAreaBase extends \TYPO3\CMS\Backend\Rte\AbstractRte {
                                        if ($plugin->main($this)) {
                                                $this->registeredPlugins[$pluginId] = $plugin;
                                                // Override buttons from previously registered plugins
-                                               $pluginButtons = GeneralUtility::trimExplode(',', $plugin->getPluginButtons(), 1);
+                                               $pluginButtons = GeneralUtility::trimExplode(',', $plugin->getPluginButtons(), TRUE);
                                                foreach ($this->pluginButton as $previousPluginId => $buttonList) {
-                                                       $this->pluginButton[$previousPluginId] = implode(',', array_diff(GeneralUtility::trimExplode(',', $this->pluginButton[$previousPluginId], 1), $pluginButtons));
+                                                       $this->pluginButton[$previousPluginId] = implode(',', array_diff(GeneralUtility::trimExplode(',', $this->pluginButton[$previousPluginId], TRUE), $pluginButtons));
                                                }
                                                $this->pluginButton[$pluginId] = $plugin->getPluginButtons();
-                                               $pluginLabels = GeneralUtility::trimExplode(',', $plugin->getPluginLabels(), 1);
+                                               $pluginLabels = GeneralUtility::trimExplode(',', $plugin->getPluginLabels(), TRUE);
                                                foreach ($this->pluginLabel as $previousPluginId => $labelList) {
-                                                       $this->pluginLabel[$previousPluginId] = implode(',', array_diff(GeneralUtility::trimExplode(',', $this->pluginLabel[$previousPluginId], 1), $pluginLabels));
+                                                       $this->pluginLabel[$previousPluginId] = implode(',', array_diff(GeneralUtility::trimExplode(',', $this->pluginLabel[$previousPluginId], TRUE), $pluginLabels));
                                                }
                                                $this->pluginLabel[$pluginId] = $plugin->getPluginLabels();
                                                $this->pluginEnabledArray[] = $pluginId;
@@ -686,7 +686,7 @@ class RteHtmlAreaBase extends \TYPO3\CMS\Backend\Rte\AbstractRte {
                }
                $toolbarOrder = $this->thisConfig['toolbarOrder'] ? $this->thisConfig['toolbarOrder'] : $this->defaultToolbarOrder;
                // Getting rid of undefined buttons
-               $this->toolbarOrderArray = array_intersect(GeneralUtility::trimExplode(',', $toolbarOrder, 1), GeneralUtility::trimExplode(',', $this->defaultToolbarOrder, 1));
+               $this->toolbarOrderArray = array_intersect(GeneralUtility::trimExplode(',', $toolbarOrder, TRUE), GeneralUtility::trimExplode(',', $this->defaultToolbarOrder, TRUE));
                $toolbarOrder = array_unique(array_values($this->toolbarOrderArray));
                // Fetching specConf for field from backend
                $pList = is_array($this->specConf['richtext']['parameters']) ? implode(',', $this->specConf['richtext']['parameters']) : '';
@@ -695,7 +695,7 @@ class RteHtmlAreaBase extends \TYPO3\CMS\Backend\Rte\AbstractRte {
                        $show = is_array($this->specConf['richtext']['parameters']) ? $this->specConf['richtext']['parameters'] : array();
                        if ($this->thisConfig['showButtons']) {
                                if (!GeneralUtility::inList($this->thisConfig['showButtons'], '*')) {
-                                       $show = array_unique(array_merge($show, GeneralUtility::trimExplode(',', $this->thisConfig['showButtons'], 1)));
+                                       $show = array_unique(array_merge($show, GeneralUtility::trimExplode(',', $this->thisConfig['showButtons'], TRUE)));
                                } else {
                                        $show = array_unique(array_merge($show, $toolbarOrder));
                                }
@@ -716,14 +716,14 @@ class RteHtmlAreaBase extends \TYPO3\CMS\Backend\Rte\AbstractRte {
                        $RTEkeyList = isset($GLOBALS['BE_USER']->userTS['options.']['RTEkeyList']) ? $GLOBALS['BE_USER']->userTS['options.']['RTEkeyList'] : '*';
                        if ($RTEkeyList != '*') {
                                // If not all
-                               $show = array_intersect($show, GeneralUtility::trimExplode(',', $RTEkeyList, 1));
+                               $show = array_intersect($show, GeneralUtility::trimExplode(',', $RTEkeyList, TRUE));
                        }
                }
                // Hiding buttons of disabled plugins
                $hideButtons = array('space', 'bar', 'linebreak');
                foreach ($this->pluginButton as $pluginId => $buttonList) {
                        if (!$this->isPluginEnabled($pluginId)) {
-                               $buttonArray = GeneralUtility::trimExplode(',', $buttonList, 1);
+                               $buttonArray = GeneralUtility::trimExplode(',', $buttonList, TRUE);
                                foreach ($buttonArray as $button) {
                                        $hideButtons[] = $button;
                                }
@@ -736,7 +736,7 @@ class RteHtmlAreaBase extends \TYPO3\CMS\Backend\Rte\AbstractRte {
                        }
                }
                // Hiding buttons
-               $show = array_diff($show, $this->conf_toolbar_hide, GeneralUtility::trimExplode(',', $this->thisConfig['hideButtons'], 1));
+               $show = array_diff($show, $this->conf_toolbar_hide, GeneralUtility::trimExplode(',', $this->thisConfig['hideButtons'], TRUE));
                // Apply toolbar constraints from registered plugins
                foreach ($this->registeredPlugins as $pluginId => $plugin) {
                        if ($this->isPluginEnabled($pluginId) && method_exists($plugin, 'applyToolbarConstraints')) {
@@ -759,7 +759,7 @@ class RteHtmlAreaBase extends \TYPO3\CMS\Backend\Rte\AbstractRte {
                foreach ($this->pluginButton as $pluginId => $buttonList) {
                        if ($this->registeredPlugins[$pluginId]->addsButtons()) {
                                $showPlugin = FALSE;
-                               $buttonArray = GeneralUtility::trimExplode(',', $buttonList, 1);
+                               $buttonArray = GeneralUtility::trimExplode(',', $buttonList, TRUE);
                                foreach ($buttonArray as $button) {
                                        if (in_array($button, $this->toolbar)) {
                                                $showPlugin = TRUE;
@@ -783,7 +783,7 @@ class RteHtmlAreaBase extends \TYPO3\CMS\Backend\Rte\AbstractRte {
                $requiredPlugins = array();
                foreach ($this->registeredPlugins as $pluginId => $plugin) {
                        if ($this->isPluginEnabled($pluginId)) {
-                               $requiredPlugins = array_merge($requiredPlugins, GeneralUtility::trimExplode(',', $plugin->getRequiredPlugins(), 1));
+                               $requiredPlugins = array_merge($requiredPlugins, GeneralUtility::trimExplode(',', $plugin->getRequiredPlugins(), TRUE));
                        }
                }
                $requiredPlugins = array_unique($requiredPlugins);
@@ -952,16 +952,16 @@ class RteHtmlAreaBase extends \TYPO3\CMS\Backend\Rte\AbstractRte {
                // Setting the list of tags to be removed if specified in the RTE config
                if (trim($this->thisConfig['removeTags'])) {
                        $configureRTEInJavascriptString .= '
-                       RTEarea[editornumber].htmlRemoveTags = /^(' . implode('|', GeneralUtility::trimExplode(',', $this->thisConfig['removeTags'], 1)) . ')$/i;';
+                       RTEarea[editornumber].htmlRemoveTags = /^(' . implode('|', GeneralUtility::trimExplode(',', $this->thisConfig['removeTags'], TRUE)) . ')$/i;';
                }
                // Setting the list of tags to be removed with their contents if specified in the RTE config
                if (trim($this->thisConfig['removeTagsAndContents'])) {
                        $configureRTEInJavascriptString .= '
-                       RTEarea[editornumber].htmlRemoveTagsAndContents = /^(' . implode('|', GeneralUtility::trimExplode(',', $this->thisConfig['removeTagsAndContents'], 1)) . ')$/i;';
+                       RTEarea[editornumber].htmlRemoveTagsAndContents = /^(' . implode('|', GeneralUtility::trimExplode(',', $this->thisConfig['removeTagsAndContents'], TRUE)) . ')$/i;';
                }
                // Setting array of custom tags if specified in the RTE config
                if (!empty($this->thisConfig['customTags'])) {
-                       $customTags = GeneralUtility::trimExplode(',', $this->thisConfig['customTags'], 1);
+                       $customTags = GeneralUtility::trimExplode(',', $this->thisConfig['customTags'], TRUE);
                        if (!empty($customTags)) {
                                $configureRTEInJavascriptString .= '
                                RTEarea[editornumber].customTags= ' . json_encode($customTags) . ';';
@@ -1068,10 +1068,10 @@ class RteHtmlAreaBase extends \TYPO3\CMS\Backend\Rte\AbstractRte {
                // Scanning the list of sets of mutually exclusives classes if specified in the RTE config
                if (is_array($RTEProperties['mutuallyExclusiveClasses.'])) {
                        foreach ($RTEProperties['mutuallyExclusiveClasses.'] as $listName => $conf) {
-                               $classSet = GeneralUtility::trimExplode(',', $conf, 1);
+                               $classSet = GeneralUtility::trimExplode(',', $conf, TRUE);
                                $classList = implode(',', $classSet);
                                foreach ($classSet as $className) {
-                                       $classesArray['XOR'][$className] = '/^(' . implode('|', GeneralUtility::trimExplode(',', GeneralUtility::rmFromList($className, $classList), 1)) . ')$/';
+                                       $classesArray['XOR'][$className] = '/^(' . implode('|', GeneralUtility::trimExplode(',', GeneralUtility::rmFromList($className, $classList), TRUE)) . ')$/';
                                }
                        }
                }
@@ -1430,7 +1430,7 @@ class RteHtmlAreaBase extends \TYPO3\CMS\Backend\Rte\AbstractRte {
                if (strstr($str, '*')) {
                        $str = '*';
                } else {
-                       $str = implode(',', array_unique(GeneralUtility::trimExplode(',', $str, 1)));
+                       $str = implode(',', array_unique(GeneralUtility::trimExplode(',', $str, TRUE)));
                }
                return $str;
        }
@@ -1439,7 +1439,7 @@ class RteHtmlAreaBase extends \TYPO3\CMS\Backend\Rte\AbstractRte {
         * @todo Define visibility
         */
        public function filterStyleEl($elValue, $matchList) {
-               $matchParts = GeneralUtility::trimExplode(',', $matchList, 1);
+               $matchParts = GeneralUtility::trimExplode(',', $matchList, TRUE);
                $styleParts = explode(';', $elValue);
                $nStyle = array();
                foreach ($styleParts as $k => $p) {
index d22b96a..0ab04f1 100644 (file)
@@ -316,11 +316,11 @@ class SelectImage extends \TYPO3\CMS\Recordlist\Browser\ElementBrowser {
                $removedProperties = array();
                if (is_array($this->buttonConfig['properties.'])) {
                        if ($this->buttonConfig['properties.']['removeItems']) {
-                               $removedProperties = GeneralUtility::trimExplode(',', $this->buttonConfig['properties.']['removeItems'], 1);
+                               $removedProperties = GeneralUtility::trimExplode(',', $this->buttonConfig['properties.']['removeItems'], TRUE);
                        }
                }
                if ($this->buttonConfig['properties.']['class.']['allowedClasses']) {
-                       $classesImageArray = GeneralUtility::trimExplode(',', $this->buttonConfig['properties.']['class.']['allowedClasses'], 1);
+                       $classesImageArray = GeneralUtility::trimExplode(',', $this->buttonConfig['properties.']['class.']['allowedClasses'], TRUE);
                        $classesImageJSOptions = '<option value=""></option>';
                        foreach ($classesImageArray as $class) {
                                $classesImageJSOptions .= '<option value="' . $class . '">' . $class . '</option>';
@@ -896,7 +896,7 @@ class SelectImage extends \TYPO3\CMS\Recordlist\Browser\ElementBrowser {
                }
                // Remove options according to RTE configuration
                if (is_array($this->buttonConfig['options.']) && $this->buttonConfig['options.']['removeItems']) {
-                       $allowedItems = array_diff($allowedItems, GeneralUtility::trimExplode(',', $this->buttonConfig['options.']['removeItems'], 1));
+                       $allowedItems = array_diff($allowedItems, GeneralUtility::trimExplode(',', $this->buttonConfig['options.']['removeItems'], TRUE));
                }
                return $allowedItems;
        }
index f47ac81..2f45614 100644 (file)
@@ -528,7 +528,7 @@ class ActionTask implements \TYPO3\CMS\Taskcenter\TaskInterface {
                // Admins can see any page, no need to check there
                if (!empty($appliedDbMounts) && !$GLOBALS['BE_USER']->isAdmin()) {
                        $cleanDbMountList = array();
-                       $dbMounts = GeneralUtility::trimExplode(',', $appliedDbMounts, 1);
+                       $dbMounts = GeneralUtility::trimExplode(',', $appliedDbMounts, TRUE);
                        // Walk through every wanted DB-Mount and check if it allowed for the current user
                        foreach ($dbMounts as $dbMount) {
                                $uid = intval(substr($dbMount, strrpos($dbMount, '_') + 1));
@@ -616,7 +616,7 @@ class ActionTask implements \TYPO3\CMS\Taskcenter\TaskInterface {
                        return $content;
                }
                $content .= '<option value=""></option>';
-               $grList = GeneralUtility::trimExplode(',', $record['t1_allowed_groups'], 1);
+               $grList = GeneralUtility::trimExplode(',', $record['t1_allowed_groups'], TRUE);
                foreach ($grList as $group) {
                        $checkGroup = BackendUtility::getRecord('be_groups', $group);
                        if (is_array($checkGroup)) {
index 437771c..28a880e 100644 (file)
@@ -554,7 +554,7 @@ class DataHandlerHook {
         * @return      array           Array of emails
         */
        protected function getEmailsForStageChangeNotification($listOfUsers, $noTablePrefix = FALSE) {
-               $users = GeneralUtility::trimExplode(',', $listOfUsers, 1);
+               $users = GeneralUtility::trimExplode(',', $listOfUsers, TRUE);
                $emails = array();
                foreach ($users as $userIdent) {
                        if ($noTablePrefix) {
@@ -1296,7 +1296,7 @@ class DataHandlerHook {
                if ($GLOBALS['TCA'][$table]['columns']) {
                        foreach ($GLOBALS['TCA'][$table]['columns'] as $field => $configArr) {
                                if ($configArr['config']['type'] === 'input') {
-                                       $evalCodesArray = GeneralUtility::trimExplode(',', $configArr['config']['eval'], 1);
+                                       $evalCodesArray = GeneralUtility::trimExplode(',', $configArr['config']['eval'], TRUE);
                                        if (in_array('uniqueInPid', $evalCodesArray) || in_array('unique', $evalCodesArray)) {
                                                $listArr[] = $field;
                                        }
index 523661d..ec4e927 100644 (file)
@@ -132,7 +132,7 @@ class ExtDirectServer extends \TYPO3\CMS\Workspaces\ExtDirect\AbstractHandler {
                if ($GLOBALS['TCA'][$parameter->table]) {
                        if ($GLOBALS['TCA'][$parameter->table]['interface']['showRecordFieldList']) {
                                $fieldsOfRecords = $GLOBALS['TCA'][$parameter->table]['interface']['showRecordFieldList'];
-                               $fieldsOfRecords = \TYPO3\CMS\Core\Utility\GeneralUtility::trimExplode(',', $fieldsOfRecords, 1);
+                               $fieldsOfRecords = \TYPO3\CMS\Core\Utility\GeneralUtility::trimExplode(',', $fieldsOfRecords, TRUE);
                        }
                }
                foreach ($fieldsOfRecords as $fieldName) {