]> git.mxchange.org Git - mailer.git/commitdiff
merge_array() call fixed
authorRoland Häder <roland@mxchange.org>
Thu, 28 Jul 2011 04:42:33 +0000 (04:42 +0000)
committerRoland Häder <roland@mxchange.org>
Thu, 28 Jul 2011 04:42:33 +0000 (04:42 +0000)
DOCS/debug-lines.sh [new file with mode: 0755]
DOCS/debug.lines.sh [deleted file]
inc/functions.php
inc/gen_mediadata.php
inc/modules/admin/admin-inc.php

diff --git a/DOCS/debug-lines.sh b/DOCS/debug-lines.sh
new file mode 100755 (executable)
index 0000000..7b31b12
--- /dev/null
@@ -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 (executable)
index 7b31b12..0000000
+++ /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
index e65600e13e36994bee1d1796de5e7cea09bad849..ac03d6e5cd7e37a4bc8b0fd1f46ea706e0f4af53 100644 (file)
@@ -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=<pre>'.print_r($args,true).',ret=<pre>'.print_r($ret,true).'</pre>');
                        } else {
                                // One parameter call
                                $ret = call_user_func($filterFunction, $value);
index 9e16179b21603d9c65b130085dea5d6f99392b35..4bbce46084204c6b2be92a95a201dc8192ada2e1 100644 (file)
@@ -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
index f07b057a7816f72ee7076278eed3b677cb1c6c32..9cba381f1dbba475a797414ffca283a2e24318c4 100644 (file)
@@ -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=<pre>'.print_r($args, true).'</pre>');
                                // @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