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
f5b46442
Commit
f5b46442
authored
Feb 08, 2022
by
Matthias Adrowski
Browse files
[TASK] Fix wrong stdwrap reading without given stdwrap
parent
f811bfbb
Changes
1
Hide whitespace changes
Inline
Side-by-side
Classes/Service/AbstractParserService.php
View file @
f5b46442
...
...
@@ -98,13 +98,6 @@ abstract class AbstractParserService {
*/
protected
function
prepareReplacementTerm
(
$replacement
,
$stdWrap
,
$termName
)
{
$cObject
=
GeneralUtility
::
makeInstance
(
ContentObjectRenderer
::
class
);
if
(
TYPO3_MODE
===
'BE'
)
{
$configurationManager
=
GeneralUtility
::
makeInstance
(
BackendConfigurationManager
::
class
);
$extbaseFrameworkConfiguration
=
$configurationManager
->
getTypoScriptSetup
();
$typoscriptConfiguration
=
$extbaseFrameworkConfiguration
[
'plugin.'
][
'tx_content_replacer.'
][
$stdWrap
.
'.'
];
}
else
{
$typoscriptConfiguration
=
$GLOBALS
[
'TSFE'
]
->
tmpl
->
setup
[
'plugin.'
][
'tx_content_replacer.'
][
$stdWrap
.
'.'
];
}
if
(
$replacement
!==
''
)
{
$replacement
=
$cObject
->
parseFunc
(
$replacement
,
$this
->
parseFunc
);
...
...
@@ -112,6 +105,13 @@ abstract class AbstractParserService {
}
if
(
$stdWrap
!==
''
)
{
if
(
TYPO3_MODE
===
'BE'
)
{
$configurationManager
=
GeneralUtility
::
makeInstance
(
BackendConfigurationManager
::
class
);
$extbaseFrameworkConfiguration
=
$configurationManager
->
getTypoScriptSetup
();
$typoscriptConfiguration
=
$extbaseFrameworkConfiguration
[
'plugin.'
][
'tx_content_replacer.'
][
$stdWrap
.
'.'
];
}
else
{
$typoscriptConfiguration
=
$GLOBALS
[
'TSFE'
]
->
tmpl
->
setup
[
'plugin.'
][
'tx_content_replacer.'
][
$stdWrap
.
'.'
];
}
$replacement
=
$cObject
->
stdWrap
(
(
$replacement
===
''
?
$termName
:
$replacement
),
$typoscriptConfiguration
...
...
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