From e2193ac1667854477d504854b89c4d8d5ad6bfa4 Mon Sep 17 00:00:00 2001
From: Georg Ringer <georg.ringer@gmail.com>
Date: Wed, 29 Jan 2020 13:00:49 +0100
Subject: [PATCH] [TASK] Respect extension state `excludeFromUpdates` during
 language updates

If the state property inside `ext_emconf.php` is set to `excludeFromUpdates`,
the extension will be skipped while updating the language files in the Install Tool.

Resolves: master
Releases: #90236
Change-Id: I741216e7fac18aeb3e1144033495c2f2943d496f
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/63065
Tested-by: TYPO3com <noreply@typo3.com>
Tested-by: Susanne Moog <look@susi.dev>
Tested-by: Benni Mack <benni@typo3.org>
Reviewed-by: Susanne Moog <look@susi.dev>
Reviewed-by: Benni Mack <benni@typo3.org>
---
 ...ExcludeFromUpdatesDuringLanguageUpdates.rst | 18 ++++++++++++++++++
 .../Classes/Service/LanguagePackService.php    |  5 +++++
 2 files changed, 23 insertions(+)
 create mode 100644 typo3/sysext/core/Documentation/Changelog/master/Important-90236-RespectExtensionStateExcludeFromUpdatesDuringLanguageUpdates.rst

diff --git a/typo3/sysext/core/Documentation/Changelog/master/Important-90236-RespectExtensionStateExcludeFromUpdatesDuringLanguageUpdates.rst b/typo3/sysext/core/Documentation/Changelog/master/Important-90236-RespectExtensionStateExcludeFromUpdatesDuringLanguageUpdates.rst
new file mode 100644
index 000000000000..e347e1c8f121
--- /dev/null
+++ b/typo3/sysext/core/Documentation/Changelog/master/Important-90236-RespectExtensionStateExcludeFromUpdatesDuringLanguageUpdates.rst
@@ -0,0 +1,18 @@
+.. include:: ../../Includes.txt
+
+========================================================================================
+Important: #90236 - Respect extension state `excludeFromUpdates` during language updates
+========================================================================================
+
+See :issue:`90236`
+
+Description
+===========
+
+If the state property inside :file:`ext_emconf.php` is set to `excludeFromUpdates`,
+the extension will be skipped while updating the language files in the Install Tool.
+
+This setting is especially helpful if you create a custom extension which uses the same extension 
+key as an existing TER extension.
+
+.. index:: Backend, ext:core
diff --git a/typo3/sysext/install/Classes/Service/LanguagePackService.php b/typo3/sysext/install/Classes/Service/LanguagePackService.php
index 1ea8fb9183e6..275bb8a7f3f8 100644
--- a/typo3/sysext/install/Classes/Service/LanguagePackService.php
+++ b/typo3/sysext/install/Classes/Service/LanguagePackService.php
@@ -159,6 +159,11 @@ class LanguagePackService implements LoggerAwareInterface
                 $EM_CONF = [];
                 include $path . 'ext_emconf.php';
                 $title = $EM_CONF[$key]['title'] ?? $title;
+
+                $state = $EM_CONF[$key]['state'] ?? '';
+                if ($state === 'excludeFromUpdates') {
+                    continue;
+                }
             }
             $extension = [
                 'key' => $key,
-- 
GitLab