--- flexinode.module	2006-01-25 12:30:04.000000000 -0500
+++ flexinode.module.New	2006-01-25 12:23:10.000000000 -0500
@@ -1,5 +1,5 @@
 <?php
-// $Id: flexinode.module,v 1.46.2.5 2006/01/14 18:00:04 robertgarrigos Exp $
+// $Id: flexinode.module,v 1.46.2.4 2005/11/29 19:01:39 ber Exp $
 
 // Copyright 2003-2004 Jonathan Chaffer. See LICENSE for redistribution allowances.
 
@@ -84,8 +84,11 @@
  * Implementation of hook_settings().
  */
 function flexinode_settings() {
-  $output = implode("\n", flexinode_invoke_all('settings'));
-  return $output;
+  $settings = flexinode_invoke_all('settings');
+  if (!empty($settings)) {
+    $output = implode("\n", $settings);
+    return $output;
+  }
 }
 
 /**
@@ -754,23 +757,18 @@
 /**
  * Invoke a field hook for all field types.
  */
-function flexinode_invoke_all() {
-  $args = func_get_args();
-  $hook = array_shift($args);
-  $return = array();
+function flexinode_invoke_all($hook, $a1 = NULL, $a2 = NULL, $a3 = NULL) {
+  $result = array();
   foreach (flexinode_field_types() as $type) {
     $function = 'flexinode_field_'. $type .'_'. $hook;
     if (function_exists($function)) {
-      $result = call_user_func_array($function, $args);
-      if (is_array($result)) {
-        $return = array_merge($return, $result);
-      }
-      else if (isset($result)) {
-        $return[] = $result;
+      $function_array = $function($a1, $a2, $a3);
+      if (is_array($function_array)) {
+        $result = array_merge($result, $function_array);
       }
     }
   }
-  return $return;
+  return $result;
 }
 
 /**
