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