[BUGFIX] Replace old optionSplit method calls 02/52502/2
authorBenni Mack <benni@typo3.org>
Wed, 19 Apr 2017 11:54:22 +0000 (13:54 +0200)
committerChristian Kuhn <lolli@schwarzbu.ch>
Wed, 19 Apr 2017 15:52:15 +0000 (17:52 +0200)
The Core has marked "TemplateService->splitConfArray" as deprecated, but
it is still used in some areas which have been forgotten.

The patch replaces the according calls to use the new TypoScriptService->
explodeConfigurationForOptionSplit method.

Resolves: #80892
Releases: master, 8.7
Change-Id: Ic8fe18c93f6658c24f3585142ec777fe0b4fca46
Reviewed-on: https://review.typo3.org/52502
Reviewed-by: Oliver Klee <typo3-coding@oliverklee.de>
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Stefan Neufeind <typo3.neufeind@speedpartner.de>
Reviewed-by: Henrik Elsner <helsner@dfau.de>
Tested-by: Henrik Elsner <helsner@dfau.de>
Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch>
Tested-by: Christian Kuhn <lolli@schwarzbu.ch>
typo3/sysext/frontend/Classes/ContentObject/ContentObjectRenderer.php
typo3/sysext/frontend/Classes/ContentObject/FilesContentObject.php
typo3/sysext/indexed_search/Classes/Controller/SearchController.php

index f8f467f..88d396b 100644 (file)
@@ -4142,7 +4142,8 @@ class ContentObjectRenderer
         if ($wrap !== '' || $cObjNumSplitConf !== '') {
             $splitArr['wrap'] = $wrap;
             $splitArr['cObjNum'] = $cObjNumSplitConf;
-            $splitArr = $GLOBALS['TSFE']->tmpl->splitConfArray($splitArr, $splitCount);
+            $splitArr = GeneralUtility::makeInstance(TypoScriptService::class)
+                ->explodeConfigurationForOptionSplit($splitArr, $splitCount);
         }
         $content = '';
         for ($a = 0; $a < $splitCount; $a++) {
index c8dcdc0..a35fdd6 100644 (file)
@@ -14,6 +14,7 @@ namespace TYPO3\CMS\Frontend\ContentObject;
  * The TYPO3 project - inspiring people to share!
  */
 
+use TYPO3\CMS\Core\TypoScript\TypoScriptService;
 use TYPO3\CMS\Core\Utility\GeneralUtility;
 use TYPO3\CMS\Core\Utility\MathUtility;
 use TYPO3\CMS\Frontend\Resource\FileCollector;
@@ -40,7 +41,8 @@ class FilesContentObject extends AbstractContentObject
         $availableFileObjectCount = count($fileObjects);
 
         // optionSplit applied to conf to allow different settings per file
-        $splitConf = $GLOBALS['TSFE']->tmpl->splitConfArray($conf, $availableFileObjectCount);
+        $splitConf = GeneralUtility::makeInstance(TypoScriptService::class)
+            ->explodeConfigurationForOptionSplit($conf, $availableFileObjectCount);
 
         $start = 0;
         if (!empty($conf['begin'])) {
index c605442..50b6ddc 100644 (file)
@@ -19,6 +19,7 @@ use TYPO3\CMS\Core\Database\Connection;
 use TYPO3\CMS\Core\Database\ConnectionPool;
 use TYPO3\CMS\Core\Database\Query\Restriction\FrontendRestrictionContainer;
 use TYPO3\CMS\Core\Html\HtmlParser;
+use TYPO3\CMS\Core\TypoScript\TypoScriptService;
 use TYPO3\CMS\Core\Utility\GeneralUtility;
 use TYPO3\CMS\Core\Utility\MathUtility;
 use TYPO3\CMS\Extbase\Utility\LocalizationUtility;
@@ -1390,7 +1391,8 @@ class SearchController extends \TYPO3\CMS\Extbase\Mvc\Controller\ActionControlle
             $pageCount = count($rl);
             if (is_array($rl) && !empty($rl)) {
                 $breadcrumbWrap = isset($this->settings['breadcrumbWrap']) ? $this->settings['breadcrumbWrap'] : '/';
-                $breadcrumbWraps = $GLOBALS['TSFE']->tmpl->splitConfArray(['wrap' => $breadcrumbWrap], $pageCount);
+                $breadcrumbWraps = GeneralUtility::makeInstance(TypoScriptService::class)
+                    ->explodeConfigurationForOptionSplit(['wrap' => $breadcrumbWrap], $pageCount);
                 foreach ($rl as $k => $v) {
                     // Check fe_user
                     if ($v['fe_group'] && ($v['uid'] == $id || $v['extendToSubpages'])) {