X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=inc%2Fwrapper-functions.php;h=2e500b1617efa3bfb7f4a79d87fb0319d5fb6bb0;hb=2cf4fdd43142b6ed33e4fa3a22539a415333a643;hp=708b2c4b1af27fc5dffc48feb2f1e92dcfe3733a;hpb=16f0ea892c6537f1eff6549ab9a3baf1d6756a13;p=mailer.git diff --git a/inc/wrapper-functions.php b/inc/wrapper-functions.php index 708b2c4b1a..2e500b1617 100644 --- a/inc/wrapper-functions.php +++ b/inc/wrapper-functions.php @@ -343,9 +343,9 @@ function isInstalled () { // First is config ( ( - isConfigEntrySet('MXCHANGE_INSTALLED') + isConfigEntrySet('MAILER_INSTALLED') ) && ( - getConfig('MXCHANGE_INSTALLED') == 'Y' + getConfig('MAILER_INSTALLED') == 'Y' ) ) ) || ( @@ -707,7 +707,7 @@ function getScriptOutputMode () { } // Setter for 'output_mode' value -function setOutputMode ($newOutputMode) { +function setScriptOutputMode ($newOutputMode) { //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'output_mode=' . $newOutputMode); $GLOBALS['__output_mode'] = (int) $newOutputMode; } @@ -1176,7 +1176,7 @@ function sendRawRedirect ($url) { $GLOBALS['__output'] = ''; // To make redirects working (no content type), output mode must be raw - setOutputMode(-1); + setScriptOutputMode(-1); // Send helping header setHttpStatus('302 Found'); @@ -2865,18 +2865,20 @@ function search_array ($array, $key, $value, $parentIndex = NULL) { if (is_array($array)) { // Search for whole array foreach ($array as $idx => $dummy) { - //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'key=' . $key . ',value=' . $value . ',idx=' . $idx); + //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'key=' . $key . ',value=' . $value . ',idx=' . $idx . ',parentIndex[' . gettype($parentIndex) . ']=' . $parentIndex); + //* DEBUG: */ print 'idx=' . $idx . ',parentIndex[' . gettype($parentIndex) . ']=' . $parentIndex . ',key=' . $key . ',value=' . $value . ',array=
'.print_r($array, TRUE).'
'; // Is dummy an array? - if (is_array($dummy)) { + if ((is_array($dummy)) && ((is_null($parentIndex)) || ($parentIndex === $value))) { // Then search again $subResult = search_array($dummy, $key, $value, $idx); //* DEBUG: */ print 'subResult=
' . print_r($subResult, TRUE).'
'; // And merge both $results = merge_array($results, $subResult, TRUE); - } elseif ((isset($array[$key])) && ($array[$key] == $value)) { + } elseif (($key == $idx) && (isset($array[$key])) && ($array[$key] === $value)) { // Is found, so add it $results[$parentIndex] = $array; + //* DEBUG: */ print 'ARRAY: key=' . $key . ',idx=' . $idx . ',value=' . $value . ',parentIndex[' . gettype($parentIndex) . ']=' . $parentIndex . ',array=
' . print_r($array, TRUE).'
'; } } // END - foreach } // END - if