* $Author:: $ *
* -------------------------------------------------------------------- *
* Copyright (c) 2003 - 2009 by Roland Haeder *
- * Copyright (c) 2009, 2010 by Mailer Developer Team *
- * For more information visit: http://www.mxchange.org *
+ * Copyright (c) 2009 - 2011 by Mailer Developer Team *
+ * For more information visit: http://mxchange.org *
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
// Checks wether the given config entry is set
function isConfigEntrySet ($configEntry) {
- //* DEBUG: */ debugOutput(__FUNCTION__.':'.$configEntry.'='.intval(isset($GLOBALS['config'][$configEntry])));
+ //* DEBUG: */ debugOutput(__FUNCTION__ . ':' . $configEntry . '=' . intval(isset($GLOBALS['config'][$configEntry])));
return (isset($GLOBALS['config'][$configEntry]));
}
// Merges $GLOBALS['config'] with data in given array
function mergeConfig ($newConfig) {
$GLOBALS['config'] = merge_array(getConfigArray(), $newConfig);
+
+ // Remove all cached entries
}
// Increment or init with given value or 1 as default the given config entry
// Is the line found?
if ((substr($line, 0, strlen($old)) == $old) && (!isset($done[$old]))) {
- // Entry found!
+ // Entry found
//* DEBUG: */ debugOutput(secureString($line) . ' - FOUND!');
// Eval the line...
$new = strtolower($new);
} // END - if
- /// ... and write it to the new config
+ // ... and write it to the new config
//* DEBUG: */ debugOutput('function=' . $function . ',new=' . $new . ',comment=' . $comment);
changeDataInInclude(getCachePath() . 'config-local.php', $comment, $function . "('" . $oldNew . "', \"", '");', constant($new), 0);
//* DEBUG: */ debugOutput('CHANGED!');
// Is the $MySQL found?
if (substr($line, 0, 6) == '$MySQL') {
- // Okay found!
+ // Okay, found
$found = true;
} elseif ($found === true) {
// Now check this row
}
// Update config entries
-function updateConfiguration ($entries, $values, $updateMode='', $config = '0') {
+function updateConfiguration ($entries, $values, $updateMode = '', $config = '0') {
// Do not update config in CSS mode
if ((isCssOutputMode()) || (isRawOutputMode()) || (isInstallationPhase())) {
+ // This logger line may be very noisy
+ /* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Not updating configuration. entries[]=' . gettype($entries) . ',values[]=' . gettype($values) . ',updateMode=' . $updateMode . ',config=' . $config . ',isCssOutputMode()=' . intval(isCssOutputMode()) . ',isRawOutputMode()=' . intval(isRawOutputMode()) . ',isInstallationPhase()=' . intval(isInstallationPhase()));
return;
} // END - if
// Filter for loading configuration
function FILTER_LOAD_CONFIGURATION ($no = '0') {
- // Is the value null, fix it :(
- if (is_null($no)) $no = '0';
+ // Is the value null, it comes from the 'init' filter chain
+ if (is_null($no)) {
+ $no = '0';
+ } // END - if
// Check for cache extension, cache-array and if the requested configuration is in cache
if ((isset($GLOBALS['cache_array']['config'][$no])) && (is_array($GLOBALS['cache_array']['config'][$no]))) {