X-Git-Url: https://git.mxchange.org/?p=mailer.git;a=blobdiff_plain;f=inc%2Fconfig-functions.php;h=c251e8dda083bd4fafff50c417fb1e2f570b096c;hp=a7f4ac979404ea5771fc78dea58722b109bafe01;hb=c4823d28fd0bd22250b16d73f2034f36fc54abda;hpb=74ca3a5c7b7546d96758217608ead67975d42dc3 diff --git a/inc/config-functions.php b/inc/config-functions.php index a7f4ac9794..c251e8dda0 100644 --- a/inc/config-functions.php +++ b/inc/config-functions.php @@ -6,9 +6,9 @@ * -------------------------------------------------------------------- * * File : config-functions.php * * -------------------------------------------------------------------- * - * Short description : Many non-MySQL functions (also file access) * + * Short description : Configuration functions * * -------------------------------------------------------------------- * - * Kurzbeschreibung : Viele Nicht-MySQL-Funktionen (auch Dateizugriff) * + * Kurzbeschreibung : Konfigurationsfunktionen * * -------------------------------------------------------------------- * * $Revision:: $ * * $Date:: $ * @@ -16,7 +16,7 @@ * $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 * @@ -71,9 +71,6 @@ function initConfig () { // 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 @@ -104,7 +101,7 @@ function mergeConfig ($newConfig) { // 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 { @@ -196,7 +193,7 @@ function updateOldConfigFile () { // 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... @@ -223,7 +220,7 @@ function updateOldConfigFile () { /// ... 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 @@ -242,7 +239,7 @@ function updateOldConfigFile () { // Is the $MySQL found? if (substr($line, 0, 6) == '$MySQL') { - // Okay found! + // Okay, found $found = true; } elseif ($found === true) { // Now check this row @@ -262,7 +259,7 @@ function updateOldConfigFile () { $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