Description made more clear
[mailer.git] / inc / config-functions.php
index 209743115ad8d477ba58a38c1826d4fd09d0e1d3..01d538db1977cd093cbb6e9edb1239a021e9220d 100644 (file)
@@ -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
@@ -93,7 +90,7 @@ function setConfigEntry ($configEntry, $value) {
 
 // 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]));
 }
 
@@ -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...
@@ -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
@@ -354,7 +351,9 @@ function updateConfiguration ($entries, $values, $updateMode='', $config = '0')
 // Filter for loading configuration
 function FILTER_LOAD_CONFIGURATION ($no = '0') {
        // Is the value null, fix it :(
-       if (is_null($no)) $no = '0';
+       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]))) {