Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
TYPO3
content_replacer
Commits
51364d49
Commit
51364d49
authored
Jan 04, 2022
by
Matthias Adrowski
Browse files
[TASK] Remove Code < TYPO3 10.4
parent
bc0d9ab3
Changes
1
Hide whitespace changes
Inline
Side-by-side
Classes/Middleware/ContentReplacerMiddleware.php
View file @
51364d49
...
...
@@ -164,7 +164,7 @@ class ContentReplacerMiddleware implements MiddlewareInterface {
* @throws \TYPO3\CMS\Core\Http\ImmediateResponseException
*/
public
function
prepareConfiguration
():
array
{
if
(
TYPO3
_MODE
===
'BE'
)
{
if
(
\
TYPO3
\CMS\Core\Http\ApplicationType
::
fromRequest
(
$GLOBALS
[
'TYPO3_REQUEST'
])
->
isBackend
()
)
{
/** @var TypoScriptFrontendController $typoScriptFrontendController */
$typoScriptFrontendController
=
$GLOBALS
[
'TSFE'
];
if
(
!
(
$typoScriptFrontendController
instanceof
TypoScriptFrontendController
))
{
...
...
@@ -179,21 +179,17 @@ class ContentReplacerMiddleware implements MiddlewareInterface {
}
$extensionConfiguration
=
$GLOBALS
[
'TYPO3_CONF_VARS'
][
'EXTENSIONS'
][
'content_replacer'
]
??
[];
if
(
TYPO3
_MODE
===
'BE'
)
{
if
(
\
TYPO3
\CMS\Core\Http\ApplicationType
::
fromRequest
(
$GLOBALS
[
'TYPO3_REQUEST'
])
->
isBackend
()
)
{
$configurationManager
=
GeneralUtility
::
makeInstance
(
BackendConfigurationManager
::
class
);
$extbaseFrameworkConfiguration
=
$configurationManager
->
getTypoScriptSetup
();
$typoscriptConfiguration
=
$extbaseFrameworkConfiguration
[
'plugin.'
][
'tx_content_replacer.'
];
}
else
{
if
(
empty
(
$GLOBALS
[
'TSFE'
]
->
tmpl
->
setup
))
{
// we need the TypoScript configuration here, force parsing
if
(
version_compare
(
VersionNumberUtility
::
getCurrentTypo3Version
(),
'10.4.0'
,
'>='
))
{
GeneralUtility
::
makeInstance
(
Context
::
class
)
->
setAspect
(
'typoscript'
,
GeneralUtility
::
makeInstance
(
TypoScriptAspect
::
class
,
TRUE
)
);
}
else
{
$GLOBALS
[
'TSFE'
]
->
forceTemplateParsing
=
TRUE
;
}
GeneralUtility
::
makeInstance
(
Context
::
class
)
->
setAspect
(
'typoscript'
,
GeneralUtility
::
makeInstance
(
TypoScriptAspect
::
class
,
TRUE
)
);
$GLOBALS
[
'TSFE'
]
->
tmpl
->
start
(
$GLOBALS
[
'TSFE'
]
->
rootLine
);
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment