Skip to content
Snippets Groups Projects
Commit 0113ad0f authored by Benni Mack's avatar Benni Mack
Browse files

[!!!][TASK] Remove charset conversion in AbstractPlugin

When overriding labels via TypoScript, e.g.
plugin.tx_felogin_pi1._LOCAL_LANG.de.username = Yeah Ümlauts
then the abstract plugin does a conversion of the string
from UTF-8 to renderCharset. However, as all values from
TypoScript are considered UTF-8 anyway, the checks
can be removed.

Resolves: #73793
Releases: master
Change-Id: Iba5366293c771721e5fba87869f4268da8bf738a
Reviewed-on: https://review.typo3.org/46978


Reviewed-by: default avatarOliver Klee <typo3-coding@oliverklee.de>
Reviewed-by: default avatarMichiel Roos <michiel@maxserv.com>
Tested-by: default avatarMichiel Roos <michiel@maxserv.com>
Reviewed-by: default avatarGeorg Ringer <georg.ringer@gmail.com>
Tested-by: default avatarGeorg Ringer <georg.ringer@gmail.com>
Reviewed-by: default avatarBenni Mack <benni@typo3.org>
Tested-by: default avatarBenni Mack <benni@typo3.org>
parent 1f436dbe
Branches
Tags
No related merge requests found
=============================================================
Breaking: #73793 - Removed AbstractPlugin->LOCAL_LANG_charset
=============================================================
Description
===========
The public property ``$LOCAL_LANG_charset`` within AbstractPlugin (formerly known as pi_base) has been removed.
The property was used to hold information which labels, coming from TypoScript that override Language files, need
to be converted to UTF-8.
Impact
======
Accessing the property within own extensions has no effect anymore.
Affected Installations
======================
Installations with extensions that provide plugins derived from AbstractPlugin and use this property.
Migration
=========
No migration needed. Make sure that all external TypoScript configuration files are stored with UTF-8 character set.
\ No newline at end of file
......@@ -102,13 +102,6 @@ class AbstractPlugin
*/
protected $LOCAL_LANG_UNSET = array();
/**
* Local Language content charset for individual labels (overriding)
*
* @var array
*/
public $LOCAL_LANG_charset = array();
/**
* Flag that tells if the locallang file has been fetch (or tried to
* be fetched) already.
......@@ -918,12 +911,7 @@ class AbstractPlugin
if (!empty($this->LOCAL_LANG[$this->LLkey][$key][0]['target'])
|| isset($this->LOCAL_LANG_UNSET[$this->LLkey][$key])
) {
// The "from" charset of csConv() is only set for strings from TypoScript via _LOCAL_LANG
if (isset($this->LOCAL_LANG_charset[$this->LLkey][$key])) {
$word = $this->frontendController->csConv($this->LOCAL_LANG[$this->LLkey][$key][0]['target'], $this->LOCAL_LANG_charset[$this->LLkey][$key]);
} else {
$word = $this->LOCAL_LANG[$this->LLkey][$key][0]['target'];
}
$word = $this->LOCAL_LANG[$this->LLkey][$key][0]['target'];
} elseif ($this->altLLkey) {
$alternativeLanguageKeys = GeneralUtility::trimExplode(',', $this->altLLkey, true);
$alternativeLanguageKeys = array_reverse($alternativeLanguageKeys);
......@@ -933,13 +921,6 @@ class AbstractPlugin
) {
// Alternative language translation for key exists
$word = $this->LOCAL_LANG[$languageKey][$key][0]['target'];
// The "from" charset of csConv() is only set for strings from TypoScript via _LOCAL_LANG
if (isset($this->LOCAL_LANG_charset[$languageKey][$key])) {
$word = $this->frontendController->csConv(
$word,
$this->LOCAL_LANG_charset[$this->altLLkey][$key]
);
}
break;
}
}
......@@ -1009,7 +990,6 @@ class AbstractPlugin
if ($labelValue === '') {
$this->LOCAL_LANG_UNSET[$languageKey][$labelKey] = '';
}
$this->LOCAL_LANG_charset[$languageKey][$labelKey] = 'utf-8';
}
}
}
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment