Commit 0e0cde8f authored by Fabian Galinski's avatar Fabian Galinski 😾
Browse files

Merge remote-tracking branch 'origin/master' into feature_deprecation

parents 192efad2 32096679
......@@ -182,14 +182,18 @@ abstract class AbstractBackendController extends AbstractController {
'override' => LocalizationUtility::translate('select.editingMode.override', 'lfeditor'),
);
$backendConfiguration = unserialize($GLOBALS['TYPO3_CONF_VARS']['EXT']['extConf']['lfeditor'], []);
if ((int)$backendConfiguration['editModeExtension'] === 0) {
if (7 === PHP_MAJOR_VERSION) {
$backendConfiguration = unserialize($GLOBALS['TYPO3_CONF_VARS']['EXT']['extConf']['lfeditor'], []);
} else {
$backendConfiguration = unserialize($GLOBALS['TYPO3_CONF_VARS']['EXT']['extConf']['lfeditor']);
}
if (isset($backendConfiguration['editModeExtension']) && ((int) $backendConfiguration['editModeExtension']) === 0) {
unset($editingModeOptions['extension']);
}
if ((int)$backendConfiguration['editModeL10n'] === 0) {
if (isset($backendConfiguration['editModeL10n']) && ((int) $backendConfiguration['editModeL10n']) === 0) {
unset($editingModeOptions['l10n']);
}
if ((int)$backendConfiguration['editModeOverride'] === 0) {
if (isset($backendConfiguration['editModeOverride']) && ((int) $backendConfiguration['editModeOverride']) === 0) {
unset($editingModeOptions['override']);
}
......
......@@ -54,7 +54,15 @@ class LicensingService {
public static function checkKey(): bool {
if (static::$isLicenseKeyValid === NULL) {
static::$isLicenseKeyValid = FALSE;
$configuration = unserialize($GLOBALS['TYPO3_CONF_VARS']['EXT']['extConf'][self::EXTENSION_KEY], [FALSE]);
if (7 === PHP_MAJOR_VERSION) {
$configuration = unserialize(
$GLOBALS['TYPO3_CONF_VARS']['EXT']['extConf'][self::EXTENSION_KEY],
[false]
);
} else {
$configuration = unserialize($GLOBALS['TYPO3_CONF_VARS']['EXT']['extConf'][self::EXTENSION_KEY]);
}
if (isset($configuration['key']) && $key = trim($configuration['key'])) {
static::$isLicenseKeyValid = (bool) preg_match('/^([A-Z\d]{6}-?){4}$/', $key);
}
......@@ -71,7 +79,14 @@ class LicensingService {
*/
public static function ping($returnUrl = FALSE): string {
try {
$configuration = unserialize($GLOBALS['TYPO3_CONF_VARS']['EXT']['extConf'][self::EXTENSION_KEY], [FALSE]);
if (7 === PHP_MAJOR_VERSION) {
$configuration = unserialize(
$GLOBALS['TYPO3_CONF_VARS']['EXT']['extConf'][self::EXTENSION_KEY],
[false]
);
} else {
$configuration = unserialize($GLOBALS['TYPO3_CONF_VARS']['EXT']['extConf'][self::EXTENSION_KEY]);
}
$key = '';
if (isset($configuration['key'])) {
$key = trim($configuration['key']);
......
......@@ -4,7 +4,7 @@
"description": "Language File Editor",
"homepage": "https://www.sgalinski.de",
"license": ["GPL-2.0-or-later"],
"version": "4.1.1",
"version": "4.1.2",
"support": {
"issues": "https://gitlab.sgalinski.de/typo3/lfeditor/issues",
"source": "https://gitlab.sgalinski.de/typo3/lfeditor/"
......
......@@ -18,7 +18,7 @@ Following functions are implemented in this module:
* Meta information handling
* Backups, recovering and diff view',
'category' => 'module',
'version' => '4.1.1',
'version' => '4.1.2',
'state' => 'stable',
'uploadfolder' => 0,
'createDirs' => '',
......
Supports Markdown
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