[BUGFIX] PageLayoutView - Keep copy settings if disabled 16/59016/7
authorAndré Schließer <a.schliesser@zeroseven.de>
Mon, 3 Dec 2018 12:37:27 +0000 (13:37 +0100)
committerMarkus Klein <markus.klein@typo3.org>
Fri, 7 Dec 2018 12:48:45 +0000 (13:48 +0100)
Disable copy option if setting mod.web_layout.localization.enableCopy = 0
in all cases.

As a newly translated page has no copies or translations this variable
will be false and this results in $allowCopy = true.
To disable the copy mode the initial setting $allowCopy
is taken into account.

Resolves: #76910
Releases: master
Change-Id: I38f16a11038885c1ba0d455d7913d729e9669817
Reviewed-on: https://review.typo3.org/59016
Reviewed-by: Mona Muzaffar <mona.muzaffar@gmx.de>
Tested-by: Mona Muzaffar <mona.muzaffar@gmx.de>
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Markus Klein <markus.klein@typo3.org>
Tested-by: Markus Klein <markus.klein@typo3.org>
typo3/sysext/backend/Classes/View/PageLayoutView.php

index 88fb440..77d71b4 100644 (file)
@@ -2432,7 +2432,7 @@ class PageLayoutView implements LoggerAwareInterface
                 $allowTranslate = false;
             }
             if (isset($this->languageHasTranslationsCache[$lP]['hasTranslations'])) {
-                $allowCopy = !$this->languageHasTranslationsCache[$lP]['hasTranslations'];
+                $allowCopy = $allowCopy && !$this->languageHasTranslationsCache[$lP]['hasTranslations'];
             }
         }