history_read_multiple

function history_read_multiple

history_read_multiple($nids)

Retrieves the last viewed timestamp for each of the passed node IDs.

Parameters

array $nids: An array of node IDs.

Return value

array Array of timestamps keyed by node ID. If a node has been previously viewed by the user, the timestamp in seconds of when the last view occurred; otherwise, zero.

File

core/modules/history/history.module, line 62
Records which users have read which content.

Code

function history_read_multiple($nids) {
  $history = &drupal_static(__FUNCTION__, array());

  $return = array();

  $nodes_to_read = array();
  foreach ($nids as $nid) {
    if (isset($history[$nid])) {
      $return[$nid] = $history[$nid];
    }
    else