You are here

function support_node_load in Support Ticketing System 7

Implementation of hook_node_load().

File

./support.module, line 903
support.module

Code

function support_node_load($nodes, $types) {
  $result = db_query('SELECT nid, message_id, state, priority, client, assigned FROM {support_ticket} WHERE nid IN(:nids)', array(
    ':nids' => array_keys($nodes),
  ));
  foreach ($result as $record) {
    if ($nodes[$record->nid]->type == 'support_ticket') {
      $nodes[$record->nid]->message_id = $record->message_id;
      $nodes[$record->nid]->state = $record->state;
      $nodes[$record->nid]->priority = $record->priority;
      $nodes[$record->nid]->client = $record->client;
      $nodes[$record->nid]->assigned = $record->assigned;
    }
  }
}