You are here

function support_ticket_load in Support Ticketing System 7

Same name and namespace in other branches
  1. 8 modules/support_ticket/support_ticket.module \support_ticket_load()
  2. 6 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 663
support.module

Code

function support_ticket_load($nid) {
  static $tickets = array();
  if (!isset($tickets[$nid])) {
    $ticket = db_select('support_ticket', 't')
      ->condition('nid', $nid)
      ->fields('t')
      ->execute()
      ->fetchObject();
    drupal_alter('support_ticket_load', $ticket);
    $tickets[$nid] = $ticket;
  }
  return $tickets[$nid];
}