Refactor phone type CRM-12464
[civicrm-core.git] / CRM / Contact / Form / Search / Criteria.php
index b79ce20edab13042094b7ae1243fad310124af0f..d95e97c50cc3fbd4d1947054ee9a7c44a1dec73a 100644 (file)
@@ -260,7 +260,7 @@ class CRM_Contact_Form_Search_Criteria {
     // Phone search
     $form->addElement('text', 'phone_numeric', ts('Phone Number'), CRM_Core_DAO::getAttribute('CRM_Core_DAO_Phone', 'phone'));
     $locationType = CRM_Core_PseudoConstant::locationType();
-    $phoneType = CRM_Core_PseudoConstant::phoneType();
+    $phoneType = CRM_Core_PseudoConstant::get('CRM_Core_DAO_Phone', 'phone_type_id');
     $form->add('select', 'phone_location_type_id', ts('Phone Location'), array('' => ts('- any -')) + $locationType);
     $form->add('select', 'phone_phone_type_id', ts('Phone Type'), array('' => ts('- any -')) + $phoneType);
   }
@@ -470,7 +470,7 @@ class CRM_Contact_Form_Search_Criteria {
     $form->add('hidden', 'hidden_demographics', 1);
     // radio button for gender
     $genderOptions = array();
-    $gender = CRM_Core_PseudoConstant::gender();
+    $gender = CRM_Core_PseudoConstant::get('CRM_Contact_DAO_Contact', 'gender_id');
     foreach ($gender as $key => $var) {
       $genderOptions[$key] = $form->createElement('radio', NULL,
         ts('Gender'), $var, $key,