Index: api.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/api/api.module,v
retrieving revision 1.88.2.101
diff -u -p -r1.88.2.101 api.module
--- api.module	11 May 2010 05:44:44 -0000	1.88.2.101
+++ api.module	11 May 2010 13:11:30 -0000
@@ -2048,26 +2053,7 @@ function api_render_class_hierarchy($obj
 }
 
 /**
- * Render lists of tables with the same header.
- *
- * @param $tables
- *   An array of data to render with theme_table.
- * @param $header
- *   Array of fields for tables header.
- *
- * @return
- *   List of themed html tables.
- */
-function api_render_tables($tables, $header) {
-  $list = array();
-  foreach ($tables as $type => $row) {
-    $list[$type] = theme('table', $header, $row);
-  }
-  return $list;
-}
-
-/**
- * Renders members lists.
+ * Renders members lists as html tables.
  *
  * @param $list
  *   Members list : array(type => array(title => object)).
@@ -2079,8 +2065,15 @@ function api_render_tables($tables, $hea
  */
 function api_render_members($list, $link_file = FALSE) {
   $branches = api_get_branches();
+  $header = array(t('Name'));
+  if ($link_file) {
+    $header[] = t('Location');
+  }
+  $header[] = t('Description');
+
+  $ret = array();
   foreach ($list as $type => $objects) {
-    $rows[$type] = array();
+    $rows = array();
     foreach ($objects as $object) {
       $row = array(l($object->title, api_url($object)));
       if ($link_file) {
@@ -2091,14 +2084,9 @@ function api_render_members($list, $link
         $summary .= ' <em>' . t('Inherited from !link', array('!link' => $object->class_link)) . '</em>';
       }
       $row[] = $summary;
-      $rows[$type][] = $row;
+      $rows[] = $row;
     }
+    $ret[$type] = theme('table', $header, $rows);
   }
-
-  $header = array(t('Name'));
-  if ($link_file) {
-    $header[] = t('Location');
-  }
-  $header[] = t('Description');
-  return api_render_tables($rows, $header);
+  return $ret;
 }
