Fixed #10490: Code cleanup/Bugfix: Add some sql_free_result to the admin_get_* functi...
[Packages/TYPO3.CMS.git] / t3lib / class.t3lib_modsettings.php
index fd2e0a5..3fd0a27 100755 (executable)
@@ -2,7 +2,7 @@
 /***************************************************************
 *  Copyright notice
 *
-*  (c) 1999-2004 Kasper Skaarhoj (kasperYYYY@typo3.com)
+*  (c) 1999-2008 Kasper Skaarhoj (kasperYYYY@typo3.com)
 *  All rights reserved
 *
 *  This script is part of the TYPO3 project. The TYPO3 project is
@@ -184,7 +184,7 @@ class t3lib_modSettings {
                $this->type = 'perm';
 
                        // enable dev logging if set
-               if ($TYPO3_CONF_VARS['SC_OPTIONS']['t3lib/class.t3lib_modSettings.php']['writeDevLog']) $this->writeDevLog = TRUE;
+               if ($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_modSettings.php']['writeDevLog']) $this->writeDevLog = TRUE;
                if (TYPO3_DLOG) $this->writeDevLog = TRUE;
        }
 
@@ -361,18 +361,17 @@ class t3lib_modSettings {
 
                $this->initStorage();
 
-               #debug($this->storedSettings, '$this->storedSettings', __LINE__, __FILE__);
-
                $storeControl = t3lib_div::_GP('storeControl');
                $storeIndex = $storeControl['STORE'];
 
-               if ($this->writeDevLog) t3lib_div::devLog('Store command: '.t3lib_div::arrayToLogString($storeControl), 't3lib_modSettings', 0);
-
                $msg = '';
                $saveSettings = FALSE;
                $writeArray = array();
 
                if (is_array($storeControl)) {
+                       if ($this->writeDevLog) {
+                               t3lib_div::devLog('Store command: '.t3lib_div::arrayToLogString($storeControl), 't3lib_modSettings', 0);
+                       }
 
                        //
                        // processing LOAD
@@ -581,4 +580,5 @@ class t3lib_modSettings {
 if (defined('TYPO3_MODE') && $TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['t3lib/class.t3lib_modSettings.php'])      {
        include_once($TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['t3lib/class.t3lib_modSettings.php']);
 }
+
 ?>
\ No newline at end of file