[BUGFIX] Removed delete icon in toolbar for sys_file_metadata 62/45162/6
authorMichael Oehlhof <typo3@oehlhof.de>
Mon, 7 Dec 2015 00:28:38 +0000 (01:28 +0100)
committerGeorg Ringer <georg.ringer@gmail.com>
Mon, 7 Dec 2015 11:36:23 +0000 (12:36 +0100)
Resolves: #71678
Releases: master
Change-Id: I28e13da627a5b9312f36e1811ede5fbe3bd415bb
Reviewed-on: https://review.typo3.org/45162
Reviewed-by: Steffen Müller <typo3@t3node.com>
Tested-by: Steffen Müller <typo3@t3node.com>
Reviewed-by: Georg Ringer <georg.ringer@gmail.com>
Tested-by: Georg Ringer <georg.ringer@gmail.com>
typo3/sysext/backend/Classes/Controller/EditDocumentController.php
typo3/sysext/backend/Configuration/UserTSconfig/Options.ts [new file with mode: 0644]
typo3/sysext/backend/ext_localconf.php

index a81c1aa..144cf57 100644 (file)
@@ -1325,7 +1325,7 @@ class EditDocumentController extends AbstractModule
             && !$GLOBALS['TCA'][$this->firstEl['table']]['ctrl']['readOnly']
             && count($this->elementsData) === 1
         ) {
-            if ($this->firstEl['cmd'] != 'new' && MathUtility::canBeInterpretedAsInteger($this->firstEl['uid'])) {
+            if ($this->firstEl['cmd'] !== 'new' && MathUtility::canBeInterpretedAsInteger($this->firstEl['uid'])) {
                 // Delete:
                 if ($this->firstEl['deleteAccess']
                     && !$GLOBALS['TCA'][$this->firstEl['table']]['ctrl']['readOnly']
diff --git a/typo3/sysext/backend/Configuration/UserTSconfig/Options.ts b/typo3/sysext/backend/Configuration/UserTSconfig/Options.ts
new file mode 100644 (file)
index 0000000..ca96d3e
--- /dev/null
@@ -0,0 +1 @@
+options.disableDelete.sys_file_metadata = 1
index f3b16f3..9535b56 100644 (file)
@@ -33,5 +33,6 @@ $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_tsfebeuserauth.php'
 // Register search key shortcuts
 $GLOBALS['TYPO3_CONF_VARS']['SYS']['livesearch']['page'] = 'pages';
 
-// Include base setup for new content element wizard
+// Include base TSconfig setup
 \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPageTSConfig('<INCLUDE_TYPOSCRIPT: source="FILE:EXT:backend/Configuration/PageTSconfig/NewContentElementWizard.ts">');
+\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addUserTSConfig('<INCLUDE_TYPOSCRIPT: source="FILE:EXT:backend/Configuration/UserTSconfig/Options.ts">');