[TASK] Remove constant TYPO3_UseCachingFramework
authorChristian Kuhn <lolli@schwarzbu.ch>
Sat, 14 Apr 2012 13:45:19 +0000 (15:45 +0200)
committerChristian Kuhn <lolli@schwarzbu.ch>
Sat, 14 Apr 2012 13:48:00 +0000 (15:48 +0200)
Change-Id: Ibf08755746bb7fdb629bd9d0e1890cec2266e40f
Resolves: #36037
Releases: 6.0
Reviewed-on: http://review.typo3.org/10468
Reviewed-by: Christian Kuhn
Tested-by: Christian Kuhn
t3lib/config_default.php
typo3/sysext/cms/tslib/class.tslib_content.php

index 5d363db..431e006 100644 (file)
@@ -154,7 +154,6 @@ $TYPO3_CONF_VARS = array(
                                ),
                        ),
                ),
-               'useCachingFramework' => -1,    // <i>Obsolete setting</i>. Please remove manually from <tt>localconf.php</tt>, if it is defined there. Caching Framework is now always enabled.
                'additionalAllowedClassPrefixes' => NULL,       // Class names in TYPO3 must usually start with tx_, Tx, user_ or User_. This setting allows to register additional prefixes in a comma separated list.
                'displayErrors' => -1,                                  // <p>Integer (-1, 0, 1, 2). Configures whether PHP errors should be displayed.</p><dl><dt>0</dt><dd>Do not display any PHP error messages. Overrides the value of "exceptionalErrors" and sets it to 0 (= no errors are turned into exceptions), the configured "productionExceptionHandler" is used as exception handler</dd><dt>1</dt><dd>Display error messages with the registered errorhandler. The configured "debugExceptionHandler" is used as exception handler</dd><dt>2</dt><dd>Display errors only if client matches <a href="#SYS-devIPmask">[SYS][devIPmask]</a>. If devIPmask matches the users IP address  the configured "debugExceptionHandler" is used  for exceptions, if not "productionExceptionHandler" will be used</dd><dt>-1</dt><dd>Default setting. With this option, you can override the PHP setting "display_errors". If devIPmask matches the users IP address  the configured "debugExceptionHandler" is used  for exceptions, if not "productionExceptionHandler" will be used.</dd></dl>
                'productionExceptionHandler'  => 't3lib_error_ProductionExceptionHandler',      // String: Classname to handle exceptions that might happen in the TYPO3-code. Leave empty to disable exception handling. Default: "t3lib_error_ProductionExceptionHandler". This exception handler displays a nice error message when something went wrong. The error message is logged to the configured logs. Note: The configured "productionExceptionHandler" is used if displayErrors is set to "0" or to "-1" and devIPmask doesn't match the users IP.
@@ -845,19 +844,6 @@ if (isset($TYPO3_CONF_VARS['SYS']['setDBinit']) &&
 
 
 
-       // If this value is not -1, then the setting has been modified in localconf.php
-if ($GLOBALS['TYPO3_CONF_VARS']['SYS']['useCachingFramework'] !== -1) {
-               // Deprecation log since 4.6, can be removed in 4.8. Checks if obsolete useCachingFramework is set
-       t3lib_div::deprecationLog('Setting $GLOBALS[\'TYPO3_CONF_VARS\'][\'SYS\'][\'useCachingFramework\'] is obsolete since TYPO3 4.6 and should be removed from localconf.php.');
-}
-
-       // Force enabled caching framework
-       // @deprecated, constant can be removed in 4.8
-define('TYPO3_UseCachingFramework', TRUE);
-       // @deprecated, can be removed in 4.8
-$GLOBALS['TYPO3_CONF_VARS']['SYS']['useCachingFramework'] = TRUE;
-
-
 /**
  * Parse old curl options and set new http ones instead
  *
index 3ef6951..2bd6249 100644 (file)
@@ -3167,41 +3167,39 @@ class tslib_cObj {
         */
        public function stdWrap_cacheStore($content = '', $conf = array()) {
                if (!empty($conf['cache.']['key'])) {
-                       if (defined('TYPO3_UseCachingFramework') && TYPO3_UseCachingFramework) {
-                               $cacheFrontend = $GLOBALS['typo3CacheManager']->getCache('cache_hash'); /* @var $cacheFrontend t3lib_cache_frontend_VariableFrontend */
-                               if ($cacheFrontend) {
-
-                                       $tags = !empty($conf['cache.']['tags']) ? t3lib_div::trimExplode(',', $conf['cache.']['tags']) : array();
-
-                                       if (strtolower($conf['cache.']['lifetime']) == 'unlimited') {
-                                               $lifetime = 0; // unlimited
-                                       } elseif (strtolower($conf['cache.']['lifetime']) == 'default') {
-                                               $lifetime = NULL; // default lifetime
-                                       } elseif (intval($conf['cache.']['lifetime']) > 0) {
-                                               $lifetime = intval($conf['cache.']['lifetime']); // lifetime in seconds
-                                       } else {
-                                               $lifetime = NULL; // default lifetime
-                                       }
+                       $cacheFrontend = $GLOBALS['typo3CacheManager']->getCache('cache_hash'); /* @var $cacheFrontend t3lib_cache_frontend_VariableFrontend */
+                       if ($cacheFrontend) {
 
-                                       if (is_array($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['tslib/class.tslib_content.php']['stdWrap_cacheStore'])) {
-                                               foreach ($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['tslib/class.tslib_content.php']['stdWrap_cacheStore'] as $_funcRef) {
-                                                       $params = array(
-                                                               'key' => $conf['cache.']['key'],
-                                                               'content' => $content,
-                                                               'lifetime' => $lifetime,
-                                                               'tags' => $tags
-                                                       );
-                                                       t3lib_div::callUserFunction($_funcRef, $params, $this);
-                                               }
-                                       }
+                               $tags = !empty($conf['cache.']['tags']) ? t3lib_div::trimExplode(',', $conf['cache.']['tags']) : array();
 
-                                       $cacheFrontend->set(
-                                               $conf['cache.']['key'],
-                                               $content,
-                                               $tags,
-                                               $lifetime
-                                       );
+                               if (strtolower($conf['cache.']['lifetime']) == 'unlimited') {
+                                       $lifetime = 0; // unlimited
+                               } elseif (strtolower($conf['cache.']['lifetime']) == 'default') {
+                                       $lifetime = NULL; // default lifetime
+                               } elseif (intval($conf['cache.']['lifetime']) > 0) {
+                                       $lifetime = intval($conf['cache.']['lifetime']); // lifetime in seconds
+                               } else {
+                                       $lifetime = NULL; // default lifetime
                                }
+
+                               if (is_array($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['tslib/class.tslib_content.php']['stdWrap_cacheStore'])) {
+                                       foreach ($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['tslib/class.tslib_content.php']['stdWrap_cacheStore'] as $_funcRef) {
+                                               $params = array(
+                                                       'key' => $conf['cache.']['key'],
+                                                       'content' => $content,
+                                                       'lifetime' => $lifetime,
+                                                       'tags' => $tags
+                                               );
+                                               t3lib_div::callUserFunction($_funcRef, $params, $this);
+                                       }
+                               }
+
+                               $cacheFrontend->set(
+                                       $conf['cache.']['key'],
+                                       $content,
+                                       $tags,
+                                       $lifetime
+                               );
                        }
                }
                return $content;
@@ -8062,4 +8060,4 @@ if (defined('TYPO3_MODE') && isset($GLOBALS['TYPO3_CONF_VARS'][TYPO3_MODE]['XCLA
        include_once($GLOBALS['TYPO3_CONF_VARS'][TYPO3_MODE]['XCLASS']['tslib/class.tslib_content.php']);
 }
 
-?>
+?>
\ No newline at end of file