Index: privatemsg.module =================================================================== RCS file: /cvs/drupal/contributions/modules/privatemsg/privatemsg.module,v retrieving revision 1.70.2.30.2.91.2.44 diff -u -p -r1.70.2.30.2.91.2.44 privatemsg.module --- privatemsg.module 26 Apr 2009 22:16:08 -0000 1.70.2.30.2.91.2.44 +++ privatemsg.module 29 May 2009 11:00:53 -0000 @@ -1645,10 +1645,28 @@ function _privatemsg_list_headers($has_p $header[$key] = $return; } } + if (count($header) <= 1) { + // No header definition returned, fallback to the default. + return $header + _privatemsg_list_default_headers(); + } return $header; } /** + * Table header definition for themes that don't support theme patterns. + * + * @return + * Array with subject, participant and last updated definition. + */ +function _privatemsg_list_default_headers() { + return array( + 'subject' => phptemplate_privatemsg_list_header__subject(), + 'participants' => phptemplate_privatemsg_list_header__participants(), + 'last_updated' => phptemplate_privatemsg_list_header__last_updated(), + ); +} + +/** * Formats a row in the message list. * * Does use theme patterns to display the single fields. @@ -1672,10 +1690,27 @@ function _privatemsg_list_thread($thread $row['data'][$key] = $return; } } + if (empty($row['data'])) { + $row['data'] = _privatemsg_list_default_thread($thread); + } return $row; } /** + * Table row definition for themes that don't support theme patterns. + * + * @return + * Array with themed subject, participant and last updated fields. + */ +function _privatemsg_list_default_thread($thread) { + return array( + 'subject' => phptemplate_privatemsg_list_field__subject($thread), + 'participants' => phptemplate_privatemsg_list_field__participants($thread), + 'last_updated' => phptemplate_privatemsg_list_field__last_updated($thread), + ); +} + +/** * Menu callback for messages/undo/action. * * This function will test if an undo callback is stored in SESSION and execute it.