From f62864d33005d7ed456819d016e3e3b2bedeb70a Mon Sep 17 00:00:00 2001
From: Marc Bastian Heinrichs <typo3@mbh-software.de>
Date: Wed, 19 Mar 2014 09:52:12 +0100
Subject: [PATCH] [TASK] Follow-up: Cleanup ext_localconf.php of sysexts

The Extbase implementation registrations don't have to
be initialized in BE mode only.

Resolves: #55593
Releases: 6.2
Change-Id: I78a643fba62d48734fc727d7bf78bf774e6c3ddd
Reviewed-on: https://review.typo3.org/28519
Reviewed-by: Wouter Wolters
Reviewed-by: Ernesto Baschny
Reviewed-by: Markus Kasten
Reviewed-by: Stefan Froemken
Tested-by: Stefan Froemken
Reviewed-by: Xavier Perseguers
Tested-by: Xavier Perseguers
Reviewed-by: Marc Bastian Heinrichs
Tested-by: Marc Bastian Heinrichs
---
 typo3/sysext/extbase/ext_localconf.php | 26 +++++++++++---------------
 1 file changed, 11 insertions(+), 15 deletions(-)

diff --git a/typo3/sysext/extbase/ext_localconf.php b/typo3/sysext/extbase/ext_localconf.php
index 801eea099b83..8f5433e152bd 100644
--- a/typo3/sysext/extbase/ext_localconf.php
+++ b/typo3/sysext/extbase/ext_localconf.php
@@ -19,21 +19,17 @@ if (!is_array($GLOBALS['TYPO3_CONF_VARS']['SYS']['caching']['cacheConfigurations
 	);
 }
 
-// We need to set the default implementation for Storage Backend & Query Settings
-// the code below is NO PUBLIC API! It's just to make sure that
-// Extbase works correctly in the backend if the page tree is empty or no
-// template is defined.
-if (TYPO3_MODE === 'BE') {
-	/** @var $extbaseObjectContainer \TYPO3\CMS\Extbase\Object\Container\Container */
-	$extbaseObjectContainer = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Extbase\\Object\\Container\\Container');
-	// Singleton
-	$extbaseObjectContainer->registerImplementation('TYPO3\CMS\Extbase\Persistence\QueryInterface', 'TYPO3\CMS\Extbase\Persistence\Generic\Query');
-	$extbaseObjectContainer->registerImplementation('TYPO3\CMS\Extbase\Persistence\QueryResultInterface', 'TYPO3\CMS\Extbase\Persistence\Generic\QueryResult');
-	$extbaseObjectContainer->registerImplementation('TYPO3\CMS\Extbase\Persistence\PersistenceManagerInterface', 'TYPO3\CMS\Extbase\Persistence\Generic\PersistenceManager');
-	$extbaseObjectContainer->registerImplementation('TYPO3\\CMS\\Extbase\\Persistence\\Generic\\Storage\\BackendInterface', 'TYPO3\\CMS\\Extbase\\Persistence\\Generic\\Storage\\Typo3DbBackend');
-	$extbaseObjectContainer->registerImplementation('TYPO3\\CMS\\Extbase\\Persistence\\Generic\\QuerySettingsInterface', 'TYPO3\\CMS\\Extbase\\Persistence\\Generic\\Typo3QuerySettings');
-	unset($extbaseObjectContainer);
-}
+// We set the default implementation for Storage Backend & Query Settings in Backend and Frontend.
+// The code below is NO PUBLIC API!
+/** @var $extbaseObjectContainer \TYPO3\CMS\Extbase\Object\Container\Container */
+$extbaseObjectContainer = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Extbase\\Object\\Container\\Container');
+// Singleton
+$extbaseObjectContainer->registerImplementation('TYPO3\CMS\Extbase\Persistence\QueryInterface', 'TYPO3\CMS\Extbase\Persistence\Generic\Query');
+$extbaseObjectContainer->registerImplementation('TYPO3\CMS\Extbase\Persistence\QueryResultInterface', 'TYPO3\CMS\Extbase\Persistence\Generic\QueryResult');
+$extbaseObjectContainer->registerImplementation('TYPO3\CMS\Extbase\Persistence\PersistenceManagerInterface', 'TYPO3\CMS\Extbase\Persistence\Generic\PersistenceManager');
+$extbaseObjectContainer->registerImplementation('TYPO3\\CMS\\Extbase\\Persistence\\Generic\\Storage\\BackendInterface', 'TYPO3\\CMS\\Extbase\\Persistence\\Generic\\Storage\\Typo3DbBackend');
+$extbaseObjectContainer->registerImplementation('TYPO3\\CMS\\Extbase\\Persistence\\Generic\\QuerySettingsInterface', 'TYPO3\\CMS\\Extbase\\Persistence\\Generic\\Typo3QuerySettings');
+unset($extbaseObjectContainer);
 
 // Register type converters
 \TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerTypeConverter('TYPO3\\CMS\\Extbase\\Property\\TypeConverter\\ArrayConverter');
-- 
GitLab