Merge pull request #1974 from rabramley/case-api-standard-get
[civicrm-core.git] / api / v3 / Contact.php
index 843e48bc86e0ec4fccc1e905d8bda74bdbaf56e9..423190976a1b184b3d039436e060b4cd232e0840 100644 (file)
@@ -182,7 +182,7 @@ function _civicrm_api3_contact_get_spec(&$params) {
   $params['state_province_id']['title'] = 'Primary Address State Province ID';
   $params['state_province_name']['title'] = 'Primary Address State Province Name';
   $params['state_province']['title'] = 'Primary Address State Province';
-  $params['country_id']['title'] = 'Primary Address State Province ID';
+  $params['country_id']['title'] = 'Primary Address Country ID';
   $params['country']['title'] = 'Primary Address country';
   $params['worldregion_id']['title'] = 'Primary Address World Region ID';
   $params['worldregion']['title'] = 'Primary Address World Region';
@@ -649,6 +649,10 @@ function civicrm_api3_contact_getquick($params) {
     }
   }
 
+  if (CRM_Utils_Array::value('contact_sub_type', $params)) {
+    $where .= " AND cc.contact_sub_type = \"{$params['contact_sub_type']}\" ";
+  }
+
   //set default for current_employer or return contact with particular id
   if (CRM_Utils_Array::value('id', $params)) {
     $where .= " AND cc.id = " . (int) $params['id'];