[BUGFIX] Hide duplicate button if sys_file_meta is edited 30/56430/2
authorGeorg Ringer <georg.ringer@gmail.com>
Thu, 22 Mar 2018 12:59:37 +0000 (13:59 +0100)
committerChristian Kuhn <lolli@schwarzbu.ch>
Thu, 29 Mar 2018 11:58:44 +0000 (13:58 +0200)
Hide the button "duplicate" in the toolbar if meta data of
files is edited.

Resolves: #84270
Releases: master
Change-Id: I72242ddcca6b91627fb061669861afa390dfa818
Reviewed-on: https://review.typo3.org/56430
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Guido Schmechel <littlegee@web.de>
Tested-by: Guido Schmechel <littlegee@web.de>
Tested-by: Riccardo De Contardi <erredeco@gmail.com>
Reviewed-by: Joerg Boesche <typo3@joergboesche.de>
Tested-by: Joerg Boesche <typo3@joergboesche.de>
Reviewed-by: Tobi Kretschmann <tobi@tobishome.de>
Tested-by: Tobi Kretschmann <tobi@tobishome.de>
Reviewed-by: Frank Naegler <frank.naegler@typo3.org>
Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch>
Tested-by: Christian Kuhn <lolli@schwarzbu.ch>
typo3/sysext/backend/Classes/Controller/EditDocumentController.php

index f60b2ef..bdbcc45 100644 (file)
@@ -1479,7 +1479,7 @@ class EditDocumentController
             ? (int)$record[$TCActrl['languageField']]
             : 0;
         $showDuplicateButton = false;
-        if ($this->firstEl['cmd'] !== 'new' && MathUtility::canBeInterpretedAsInteger($this->firstEl['uid'])) {
+        if ($this->firstEl['cmd'] !== 'new' && $this->firstEl['table'] !== 'sys_file_metadata' && MathUtility::canBeInterpretedAsInteger($this->firstEl['uid'])) {
             if ($sysLanguageUid === 0) {
                 // show button, if record is in default language
                 $showDuplicateButton = true;