New debugging function debugOutput() introduced, some rewrites to EL:
[mailer.git] / inc / inc-functions.php
index 989eb238d4fb910d572ab93a4b0c8eb02f77420a..ee808594438db16295ca8c916ad7f772bfc504de 100644 (file)
@@ -44,19 +44,19 @@ if (!defined('__SECURITY')) {
 
 // Init INC_POOL
 function initIncludePool ($pool) {
-       //* DEBUG: */ print __FUNCTION__.':pool='.$pool.'<br />';
+       //* DEBUG: */ debugOutput(__FUNCTION__.':pool='.$pool);
        $GLOBALS['inc_pool'][$pool] = array();
 }
 
 // Setter for INC_POOL
 function setIncludePool ($pool, $includePool) {
-       //* DEBUG: */ print __FUNCTION__.':pool='.$pool.'<br />';
+       //* DEBUG: */ debugOutput(__FUNCTION__.':pool='.$pool);
        $GLOBALS['inc_pool'][$pool] = (array) $includePool;
 }
 
 // Getter for INC_POOL
 function getIncludePool ($pool) {
-       //* DEBUG: */ print __FUNCTION__.':pool='.$pool.'<br />';
+       //* DEBUG: */ debugOutput(__FUNCTION__.':pool='.$pool);
        if (isset($GLOBALS['inc_pool'][$pool])) {
                // Return found pool (array)
                return $GLOBALS['inc_pool'][$pool];
@@ -68,25 +68,25 @@ function getIncludePool ($pool) {
 
 // Count INC_POOL
 function countIncludePool ($pool) {
-       //* DEBUG: */ print __FUNCTION__.':pool='.$pool.'<br />';
+       //* DEBUG: */ debugOutput(__FUNCTION__.':pool='.$pool);
        return count($GLOBALS['inc_pool'][$pool]);
 }
 
 // Merge INC_POOL into given
 function mergeIncludePool ($pool, $includePool) {
-       //* DEBUG: */ print __FUNCTION__.':pool='.$pool.'<br />';
+       //* DEBUG: */ debugOutput(__FUNCTION__.':pool='.$pool);
        setIncludePool($pool, merge_array(getIncludePool($pool), $includePool));
 }
 
 // Add single include file to INC_POOL
 function addIncludeToPool ($pool, $inc) {
-       //* DEBUG: */ print __FUNCTION__.':pool='.$pool.'<br />';
+       //* DEBUG: */ debugOutput(__FUNCTION__.':pool='.$pool);
        $GLOBALS['inc_pool'][$pool][] = (string) $inc;
 }
 
 // Remove an include file from INC_POOL
 function removeIncludeFromPool ($pool, $inc) {
-       //* DEBUG: */ print __FUNCTION__.':pool='.$pool.'<br />';
+       //* DEBUG: */ debugOutput(__FUNCTION__.':pool='.$pool);
        // First look it up
        $key = array_search($inc, getIncludePool($pool));
 
@@ -102,12 +102,12 @@ function removeIncludeFromPool ($pool, $inc) {
 
 // Load the whole include pool
 function loadIncludePool ($pool) {
-       //* DEBUG: */ print __FUNCTION__.':pool='.$pool.' - START<br />';
+       //* DEBUG: */ debugOutput(__FUNCTION__.':pool='.$pool.' - START');
        foreach (getIncludePool($pool) as $inc) {
-               //* DEBUG: */ print __FUNCTION__.':inc='.$inc.'<br />';
+               //* DEBUG: */ debugOutput(__FUNCTION__.':inc='.$inc);
                loadIncludeOnce($inc);
        } // END - foreach
-       //* DEBUG: */ print __FUNCTION__.':pool='.$pool.' - END<br />';
+       //* DEBUG: */ debugOutput(__FUNCTION__.':pool='.$pool.' - END');
 
        // Remove it
        initIncludePool($pool);