function support_substatus_default in Support Ticketing System 6
Determine default for a list of substatus fields.
1 call to support_substatus_default()
- support_substatus_form_alter in support_substatus/
support_substatus.module
File
- support_substatus/
support_substatus.module, line 513 - 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 <jeremy@tag1consulting.com> @package Support
Code
function support_substatus_default($substatus) {
$ssids = array();
foreach ($substatus as $ssid => $stuff) {
$ssids[] = $ssid;
}
if (empty($ssids)) {
return 0;
}
else {
return db_result(db_query_range('SELECT ssid FROM {support_substatus} WHERE ssid IN (%s) AND disabled = 0 ORDER BY weight ASC', implode(',', $ssids), 0, 1));
}
}