Index: privatemsg.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/privatemsg/privatemsg.module,v
retrieving revision 1.70.2.30.2.91.2.54
diff -u -r1.70.2.30.2.91.2.54 privatemsg.module
--- privatemsg.module	22 Jun 2009 18:32:43 -0000	1.70.2.30.2.91.2.54
+++ privatemsg.module	25 Jun 2009 18:14:55 -0000
@@ -1705,6 +1705,27 @@
       $header[$key] = $return;
     }
   }
+  if (count($header) <= 1) {
+    // No header definition returned, fallback to the default.
+    return $header + _privatemsg_list_headers_fallback($keys);
+  }
+  return $header;
+}
+
+/**
+ * Table header definition for themes that don't support theme patterns.
+ * 
+ * @return
+ *   Array with the correct headers.
+ */
+function _privatemsg_list_headers_fallback($keys) {
+  foreach ($keys as $key) {
+    $theme_function = 'phptemplate_privatemsg_list_header__' .$key;
+    if (function_exists($theme_function)) {
+      $header[$key] = $theme_function();
+    }
+  }
+  
   return $header;
 }
 
@@ -1732,10 +1753,30 @@
       $row['data'][$key] = $return;
     }
   }
+  if (empty($row['data'])) {
+    $row['data'] = _privatemsg_list_thread_fallback($thread);
+  }
   return $row;
 }
 
 /**
+ * Table row definition for themes that don't support theme patterns.
+ *
+ * @return
+ *   Array with row data.
+ */
+function _privatemsg_list_thread_fallback($thread) {
+  foreach ($thread as $key => $data) {
+    $theme_function = 'phptemplate_privatemsg_list_field__' .$key;
+    if (function_exists($theme_function)) {
+      $row_data[$key] = $theme_function($thread);
+    }
+  }
+  
+  return $row_data;
+}
+
+/**
  * Menu callback for messages/undo/action.
  *
  * This function will test if an undo callback is stored in SESSION and execute it.
Index: privatemsg.theme.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/privatemsg/Attic/privatemsg.theme.inc,v
retrieving revision 1.1.2.5
diff -u -r1.1.2.5 privatemsg.theme.inc
--- privatemsg.theme.inc	8 Jun 2009 11:19:18 -0000	1.1.2.5
+++ privatemsg.theme.inc	25 Jun 2009 18:04:11 -0000
@@ -77,9 +77,6 @@
  * @see theme_privatemsg_list_field()
  */
 function phptemplate_privatemsg_list_field__participants($thread) {
-  if (empty($thread['participants'])) {
-    return;
-  }
   $participants = _privatemsg_generate_user_array($thread['participants'], -4);
   $field = array();
   $field['data'] = _privatemsg_format_participants($participants, 3, TRUE);

