You are here

function support_client_load in Support Ticketing System 6

Same name and namespace in other branches
  1. 7 support.module \support_client_load()

Menu callback, load a client.

17 calls to support_client_load()
support_access in ./support.module
Implementation of hook_access().
support_link_alter in ./support.module
Implementation of hook_link_alter().
support_mail_tokens in ./support.module
Return an array of token to value mappings for support e-mail messages.
support_nodeapi in ./support.module
Implementation of hook_nodeapi().
support_overview_page_user in support_overview/support_overview.module

... See full list

2 string references to 'support_client_load'
support_pm_admin_reports in support_pm/support_pm.admin.inc
support_pm_plan_overview_weekly in support_pm/support_pm.module

File

./support.module, line 597
support.module

Code

function support_client_load($id, $integer = TRUE) {
  static $clients = array();
  if (!isset($clients[$id])) {
    if ($integer) {
      $client = db_fetch_object(db_query('SELECT clid, name, path, status, parent, integrate_email, server_name, server_username, server_password, mailfrom, mailbox, protocol, extra, port, notes, autoassign, autosubscribe, thread_subject, domains, user_creation FROM {support_client} WHERE clid = %d', $id));
    }
    else {
      $client = db_fetch_object(db_query("SELECT clid, name, path, status, integrate_email, server_name, server_username, server_password, mailfrom, mailbox, protocol, extra, port, notes, autoassign, autosubscribe, thread_subject, domains, user_creation FROM {support_client} WHERE path = '%s'", $id));
    }
    drupal_alter('support_client_load', $client);
    $clients[$id] = $client;
  }
  return $clients[$id];
}