From aee4b4a9145e5d81ac5baf1014d53a467c97c4f8 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Thu, 28 Jul 2011 04:42:33 +0000 Subject: [PATCH] merge_array() call fixed --- DOCS/{debug.lines.sh => debug-lines.sh} | 0 inc/functions.php | 3 +-- inc/gen_mediadata.php | 4 ++++ inc/modules/admin/admin-inc.php | 12 ++++++------ 4 files changed, 11 insertions(+), 8 deletions(-) rename DOCS/{debug.lines.sh => debug-lines.sh} (100%) diff --git a/DOCS/debug.lines.sh b/DOCS/debug-lines.sh similarity index 100% rename from DOCS/debug.lines.sh rename to DOCS/debug-lines.sh 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 -- 2.39.2