* $Author:: $ *
* -------------------------------------------------------------------- *
* Copyright (c) 2003 - 2009 by Roland Haeder *
- * Copyright (c) 2009, 2010 by Mailer Developer Team *
+ * Copyright (c) 2009 - 2011 by Mailer Developer Team *
* For more information visit: http://www.mxchange.org *
* *
* This program is free software; you can redistribute it and/or modify *
// Getter for $GLOBALS['config'] entries
function getConfig ($configEntry) {
- // Default value
- $value = null;
-
// Is the entry there?
if (!isConfigEntrySet($configEntry)) {
// Raise an error of missing entries
// 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]));
}
// Increment or init with given value or 1 as default the given config entry
function incrementConfigEntry ($configEntry, $value=1) {
- // Increment it if set or init it with 1
+ // Increment it if set or init it with $value
if (isConfigEntrySet($configEntry)) {
$GLOBALS['config'][$configEntry] += $value;
} else {
// 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...
/// ... and write it to the new config
//* DEBUG: */ debugOutput('function=' . $function . ',new=' . $new . ',comment=' . $comment);
- changeDataInFile(getCachePath() . 'config-local.php', $comment, $function . "('" . $oldNew . "', \"", '");', constant($new), 0);
+ changeDataInInclude(getCachePath() . 'config-local.php', $comment, $function . "('" . $oldNew . "', \"", '");', constant($new), 0);
//* DEBUG: */ debugOutput('CHANGED!');
// Mark it as done
// Is the $MySQL found?
if (substr($line, 0, 6) == '$MySQL') {
- // Okay found!
+ // Okay, found
$found = true;
} elseif ($found === true) {
// Now check this row
$key = substr(trim($parts[0]), 1, -1); $value = substr(trim($parts[1]), 1, -2);
// We can now save the right part in new config file
- changeDataInFile(getCachePath() . 'config-local.php', $comments[$key], " '".$key."' => \"", '",', $value, 0);
+ changeDataInInclude(getCachePath() . 'config-local.php', $comments[$key], " '".$key."' => \"", '",', $value, 0);
}
} // END - foreach