function heartbeat_get_messages in Heartbeat 6.3
Get heartbeat messages of the the given
File
- ./
heartbeat.module, line 787
Code
function heartbeat_get_messages($type = 'all', $reset = false) {
static $messages;
if ($type == 'all') {
$messages = heartbeat_messages('all', $reset, true);
$reset = false;
}
if ($type != 'all' && (empty($messages) || $reset)) {
$messages = array();
$result = db_query("SELECT * FROM {heartbeat_messages} WHERE message_type = '%s'", $type);
while ($row = db_fetch_array($result)) {
$messages[] = new HeartbeatActivity($row);
}
}
return $messages;
}