]> git.mxchange.org Git - mailer.git/blobdiff - inc/config-functions.php
Wrong array element fixed
[mailer.git] / inc / config-functions.php
index a7f4ac979404ea5771fc78dea58722b109bafe01..c7f4cdaa397e6a44de3192727e1e08cc2740e71e 100644 (file)
@@ -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::                                                            $ *
@@ -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 {
@@ -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
@@ -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