Created
December 24, 2012 15:37
-
-
Save amitaibu/4369679 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Implements hook_views_pre_render(). | |
*/ | |
function message_views_pre_render(&$view) { | |
if ($view->base_table != 'message' || empty($view->result[0]->mid)) { | |
// Not a message view, or no results with message ID. | |
return; | |
} | |
$mids = array(); | |
foreach ($view->result as $row) { | |
$mids[] = $row->mid; | |
} | |
message_load_multiple($mids); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment