[BUGFIX] Caching framework: Reduce code duplication in db backend
[Packages/TYPO3.CMS.git] / t3lib / extjs / class.t3lib_extjs_extdirectdebug.php
index dcdd8f2..31809c9 100644 (file)
@@ -2,7 +2,7 @@
 /***************************************************************
  *  Copyright notice
  *
- *  (c) 2010 Stefan Galinski <stefan.galinski@gmail.com>
+ *  (c) 2010-2011 Stefan Galinski <stefan.galinski@gmail.com>
  *  All rights reserved
  *
  *  This script is part of the TYPO3 project. The TYPO3 project is
@@ -39,6 +39,22 @@ class t3lib_extjs_ExtDirectDebug {
         */
        protected $debugMessages = array();
 
+
+       /**
+        * destructor
+        *
+        * Currently empty, but automatically registered and called during
+        * ExtDirect shutdown.
+        *
+        * @see http://bugs.typo3.org/view.php?id=17891
+        * @see http://forge.typo3.org/issues/25278
+        */
+       public function __destruct() {
+
+       /* currently empty */
+       }
+
+
        /**
         * Adds a new message of any data type to the internal debug message array.
         *
@@ -64,8 +80,8 @@ class t3lib_extjs_ExtDirectDebug {
        }
 }
 
-if (defined('TYPO3_MODE') && $TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['t3lib/extjs/class.t3lib_extjs_extdirectdebug.php']) {
-       include_once($TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['t3lib/extjs/class.t3lib_extjs_extdirectdebug.php']);
+if (defined('TYPO3_MODE') && isset($GLOBALS['TYPO3_CONF_VARS'][TYPO3_MODE]['XCLASS']['t3lib/extjs/class.t3lib_extjs_extdirectdebug.php'])) {
+       include_once($GLOBALS['TYPO3_CONF_VARS'][TYPO3_MODE]['XCLASS']['t3lib/extjs/class.t3lib_extjs_extdirectdebug.php']);
 }
 
 ?>
\ No newline at end of file