You are here

function _support_substatus_client_substatus in Support Ticketing System 6

1 call to _support_substatus_client_substatus()
support_substatus_form_alter in support_substatus/support_substatus.module


support_substatus/support_substatus.module, line 586
Support Substatus -- allows per-status sub-status values, so for example a "pending" ticket can be further marked with "needs review", etc. @author Jeremy Andrews <> @package Support


function _support_substatus_client_substatus($clid) {
  static $ssids = array();
  if (!isset($ssids[$clid])) {
    $result = db_query('SELECT DISTINCT(ss.ssid) AS ssid, ss.substatus FROM {support_substatus} ss LEFT JOIN {support_substatus_client} ssc ON ss.ssid = ssc.ssid WHERE ssc.clid = %d ORDER BY ss.substatus ASC', $clid);
    while ($substatus = db_fetch_object($result)) {
      $ssids[$clid][$substatus->ssid] = $substatus->substatus;
  if (isset($ssids[$clid])) {
    return $ssids[$clid];
  return NULL;