[TASK] Disable clear lang cache menu by default
authorDominique Feyer <dominique.feyer@reelpeek.net>
Mon, 11 Jul 2011 09:22:31 +0000 (11:22 +0200)
committerXavier Perseguers <typo3@perseguers.ch>
Tue, 12 Jul 2011 07:16:06 +0000 (09:16 +0200)
By default the clear lang cache should not be enabled.

You can enable it if needed with this configuration, in localconf.php:
$GLOBALS['TYPO3_CONF_VARS']['SYS']['lang']['cache']['clear_menu'] = TRUE;

Change-Id: I1b7796aca65eb45922d85a6ddd9b6220a3bd89ae
Resolves: #28086
Reviewed-on: http://review.typo3.org/3239
Reviewed-by: Xavier Perseguers
Tested-by: Xavier Perseguers
t3lib/config_default.php
typo3/sysext/lang/ext_localconf.php

index 23d103a..489a8cd 100644 (file)
@@ -58,7 +58,8 @@ $TYPO3_CONF_VARS = array(
        'SYS' => array(                 // System related concerning both frontend and backend.
                'lang' => array(
                        'cache' => array(
-                               'lifetime' => 86400
+                               'lifetime' => 86400,
+                               'clear_menu' => FALSE,
                        ),
                        'format' => array(
                                'priority' => 'xlf,xml,php'
index da8bd39..26ec14a 100644 (file)
@@ -12,8 +12,10 @@ if (!isset($GLOBALS['TYPO3_CONF_VARS']['SYS']['caching']['cacheConfigurations'][
     $GLOBALS['TYPO3_CONF_VARS']['SYS']['caching']['cacheConfigurations']['t3lib_l10n']['backend'] = 't3lib_cache_backend_FileBackend';
 }
 
-       // Register Clear Cache Menu hook
-$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['additionalBackendItems']['cacheActions']['clearLangCache'] = 'EXT:lang/hooks/clearcache/class.tx_lang_clearcachemenu.php:&tx_lang_clearcachemenu';
+if (isset($GLOBALS['TYPO3_CONF_VARS']['SYS']['lang']['cache']['clear_menu']) && $GLOBALS['TYPO3_CONF_VARS']['SYS']['lang']['cache']['clear_menu']) {
+               // Register Clear Cache Menu hook
+       $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['additionalBackendItems']['cacheActions']['clearLangCache'] = 'EXT:lang/hooks/clearcache/class.tx_lang_clearcachemenu.php:&tx_lang_clearcachemenu';
+}
 
        // Register Ajax call
 $GLOBALS['TYPO3_CONF_VARS']['BE']['AJAX']['lang::clearCache'] = 'EXT:lang/hooks/clearcache/class.tx_lang_clearcache.php:tx_lang_clearcache->clearCache';