You are here

function support_ticket_load in Support Ticketing System 6

Same name and namespace in other branches
  1. 8 modules/support_ticket/support_ticket.module \support_ticket_load()
  2. 7 support.module \support_ticket_load()

Menu callback, load a ticket.

3 calls to support_ticket_load()
support_account_load in ./support.module
Match up a user account with an incoming email. Create account if email doesn't match any. TODO: Make it possible to assign multiple email addresses to one account.
support_mailcmd_support_fetch_message_alter in support_mailcmd/support_mailcmd.module
Implementation of hook_support_fetch_message_alter().
support_save_message in ./support.module
Save the message.

File

./support.module, line 616
support.module

Code

function support_ticket_load($nid) {
  static $tickets = array();
  if (!isset($tickets[$nid])) {
    $ticket = db_fetch_object(db_query('SELECT * FROM {support_ticket} WHERE nid = %d', $nid));
    drupal_alter('support_ticket_load', $ticket);
    $tickets[$nid] = $ticket;
  }
  return $tickets[$nid];
}