You are here

public function PrivateHeartbeat::dressUpMessages in Heartbeat 6.3

Same name and namespace in other branches
  1. 6.4 includes/privateheartbeat.inc \PrivateHeartbeat::dressUpMessages()

Overrides HeartbeatAccess::dressUpMessages

File

includes/privateheartbeat.inc, line 11

Class

PrivateHeartbeat
Class PrivateHeartbeat Concrete class to prepare messages for the current user only

Code

public function dressUpMessages(HeartbeatParser $heartbeat) {
  $heartbeatInfo = $heartbeat
    ->get_info();
  $heartbeatInfo->limit_view = variable_get('heartbeat_block_public_items_max', 25);
  $heartbeat
    ->set_info($heartbeatInfo);
  $sql = $heartbeatInfo->sql_start;
  $sql .= " AND ((ua.uid = %d  AND ua.access = %d ) OR (ua.uid_target = %d AND ua.access > %d) )";
  $sql .= $heartbeatInfo->sql_end;
  $result = db_query_range($sql, $heartbeatInfo->language, $heartbeatInfo->uid, HEARTBEAT_PRIVATE, $heartbeatInfo->uid, HEARTBEAT_PRIVATE, $heartbeatInfo->start_time, 0, $heartbeatInfo->limit_sql);
  while ($heartbeat_row = db_fetch_object($result)) {
    $heartbeat->raw_messages[$heartbeat_row->uaid] = $heartbeat_row;
  }
  return $heartbeat;
}