From: Roland Häder Date: Thu, 28 Jul 2011 04:42:33 +0000 (+0000) Subject: merge_array() call fixed X-Git-Url: https://git.mxchange.org/?p=mailer.git;a=commitdiff_plain;h=aee4b4a9145e5d81ac5baf1014d53a467c97c4f8 merge_array() call fixed --- diff --git a/DOCS/debug-lines.sh b/DOCS/debug-lines.sh new file mode 100755 index 0000000000..7b31b121f8 --- /dev/null +++ b/DOCS/debug-lines.sh @@ -0,0 +1,10 @@ +#!/bin/sh + +# Shell script to determine where in the code are commented-in debug lines +# +if ! test -e "modules.php"; then + echo "$0: Please execute this script from root directory." + exit 1 +fi + +svn diff |grep -v "svn diff" | grep "DEBUG" | grep "+" | grep -v "//\* DEBUG" > DOCS/debug-lines.log diff --git a/DOCS/debug.lines.sh b/DOCS/debug.lines.sh deleted file mode 100755 index 7b31b121f8..0000000000 --- a/DOCS/debug.lines.sh +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/sh - -# Shell script to determine where in the code are commented-in debug lines -# -if ! test -e "modules.php"; then - echo "$0: Please execute this script from root directory." - exit 1 -fi - -svn diff |grep -v "svn diff" | grep "DEBUG" | grep "+" | grep -v "//\* DEBUG" > DOCS/debug-lines.log diff --git a/inc/functions.php b/inc/functions.php index e65600e13e..ac03d6e5cd 100644 --- a/inc/functions.php +++ b/inc/functions.php @@ -295,7 +295,7 @@ function generateDateTime ($time, $mode = '0') { default: logDebugMessage(__FUNCTION__, __LINE__, sprintf("Invalid date mode %s detected.", $mode)); break; - } + } // END - switch break; default: // Default is the US date / time format! @@ -1453,7 +1453,6 @@ function handleExtraValues ($filterFunction, $value, $extraValue) { // Call the multi-parameter call-back $ret = call_user_func_array($filterFunction, $args); - die('filterFunction='.$filterFunction.',args=
'.print_r($args,true).',ret=
'.print_r($ret,true).'
'); } else { // One parameter call $ret = call_user_func($filterFunction, $value); diff --git a/inc/gen_mediadata.php b/inc/gen_mediadata.php index 9e16179b21..4bbce46084 100644 --- a/inc/gen_mediadata.php +++ b/inc/gen_mediadata.php @@ -55,6 +55,8 @@ $result_media = SQL_QUERY('SELECT SUM(`clicks`) AS `normal_clicks` FROM `{?_MYSQL_PREFIX?}_user_stats`', __FILE__, __LINE__); + +// Merge data together $content = merge_array($content, SQL_FETCHARRAY($result_media)); // Free memory @@ -72,6 +74,8 @@ if (isExtensionActive('bonus')) { FROM `{?_MYSQL_PREFIX?}_bonus` LIMIT 1', __FILE__, __LINE__); + + // Merge data together $content = merge_array($content, SQL_FETCHARRAY($result_media)); // Free memory diff --git a/inc/modules/admin/admin-inc.php b/inc/modules/admin/admin-inc.php index f07b057a78..9cba381f1d 100644 --- a/inc/modules/admin/admin-inc.php +++ b/inc/modules/admin/admin-inc.php @@ -1344,7 +1344,7 @@ function adminListEntries ($tableTemplate, $rowTemplate, $noEntryMessageId, $tab } // END - if // Now handle all over to the inner function which will execute the listing - doAdminListEntries($SQL, $tableTemplate, $noEntryMessageId, $rowTemplate, $callbackColumns, $extraParameters = array()); + doAdminListEntries($SQL, $tableTemplate, $noEntryMessageId, $rowTemplate, $callbackColumns, $extraParameters); } // Do the listing of entries @@ -1358,20 +1358,20 @@ function doAdminListEntries ($SQL, $tableTemplate, $noEntryMessageId, $rowTempla $OUT = ''; while ($content = SQL_FETCHARRAY($result)) { // "Translate" content - foreach ($callbackColumns as $column=>$callbackFunction) { + foreach ($callbackColumns as $columnName=>$callbackFunction) { // Fill the callback arguments - $args = array($content[$column]); + $args = array($content[$columnName]); // Do we have more to add? - if (isset($extraParameters[$column])) { + if (isset($extraParameters[$columnName])) { // Add them as well - merge_array($args, $extraParameters[$column]); + $args = merge_array($args, $extraParameters[$columnName]); } // END - if // Call the callback-function //* NOISY-DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'callbackFunction=' . $callbackFunction . ',args=
'.print_r($args, true).'
'); // @TODO If we can rewrite the EL sub-system to support more than one parameter, this call_user_func_array() can be avoided - $content[$column] = call_user_func_array($callbackFunction, $args); + $content[$columnName] = call_user_func_array($callbackFunction, $args); } // END - foreach // Load row template