[BUGFIX] Allow RTE yml presets in LocalConfiguration 90/53190/2
authorChristian Kuhn <lolli@schwarzbu.ch>
Fri, 9 Jun 2017 21:36:13 +0000 (23:36 +0200)
committerBenni Mack <benni@typo3.org>
Mon, 12 Jun 2017 13:14:41 +0000 (15:14 +0200)
ext:rte_ckeditor declares the default config yml preset pointers
of TYPO3_CONF_VARS['RTE'] in its ext_localconf.php file.
This file is loaded after LocalConfiguration.php.
The patch wraps the declarations in guards to ensure any
previously set pointers are not blindly reset.

Change-Id: Ic945d988f436aab7453b7f7fba8694bbf3580b1d
Resolves: #81537
Releases: master, 8.7
Reviewed-on: https://review.typo3.org/53190
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Benni Mack <benni@typo3.org>
Tested-by: Benni Mack <benni@typo3.org>
typo3/sysext/rte_ckeditor/ext_localconf.php

index 324b8b0..0fde352 100644 (file)
@@ -24,6 +24,12 @@ if (TYPO3_MODE === 'BE' && !(TYPO3_REQUESTTYPE & TYPO3_REQUESTTYPE_CLI)) {
 }
 
 // Register the presets
-$GLOBALS['TYPO3_CONF_VARS']['RTE']['Presets']['default'] = 'EXT:rte_ckeditor/Configuration/RTE/Default.yaml';
-$GLOBALS['TYPO3_CONF_VARS']['RTE']['Presets']['minimal'] = 'EXT:rte_ckeditor/Configuration/RTE/Minimal.yaml';
-$GLOBALS['TYPO3_CONF_VARS']['RTE']['Presets']['full'] = 'EXT:rte_ckeditor/Configuration/RTE/Full.yaml';
+if (empty($GLOBALS['TYPO3_CONF_VARS']['RTE']['Presets']['default'])) {
+    $GLOBALS['TYPO3_CONF_VARS']['RTE']['Presets']['default'] = 'EXT:rte_ckeditor/Configuration/RTE/Default.yaml';
+}
+if (empty($GLOBALS['TYPO3_CONF_VARS']['RTE']['Presets']['minimal'])) {
+    $GLOBALS['TYPO3_CONF_VARS']['RTE']['Presets']['minimal'] = 'EXT:rte_ckeditor/Configuration/RTE/Minimal.yaml';
+}
+if (empty($GLOBALS['TYPO3_CONF_VARS']['RTE']['Presets']['full'])) {
+    $GLOBALS['TYPO3_CONF_VARS']['RTE']['Presets']['full'] = 'EXT:rte_ckeditor/Configuration/RTE/Full.yaml';
+}