From: Donald A. Lobo Date: Tue, 30 Apr 2013 21:58:52 +0000 (-0700) Subject: Migrate to new code X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=3cf5f8e490da971f72bbb62a279355461d80f62a;p=civicrm-core.git Migrate to new code --- diff --git a/CRM/Contact/BAO/Query.php b/CRM/Contact/BAO/Query.php index 2ac81c09a5..9112fbb984 100644 --- a/CRM/Contact/BAO/Query.php +++ b/CRM/Contact/BAO/Query.php @@ -587,7 +587,7 @@ class CRM_Contact_BAO_Query { continue; } - if ($field['pseudoconstant']) { + if (CRM_Utils_Array::value('pseudoconstant', $field)) { continue; } @@ -1730,7 +1730,7 @@ class CRM_Contact_BAO_Query { elseif ($field['pseudoconstant']) { $this->optionValueQuery( $name, $op, $value, $grouping, - CRM_Core_PseudoConstant::{$field['pseudoconstant']['name']}(), + CRM_Core_PseudoConstant::get('CRM_Contact_DAO_Contact', $field['dbName']), $field, $field['title'], 'String', diff --git a/CRM/Core/OptionValue.php b/CRM/Core/OptionValue.php index d54ff87f90..cd3a892e54 100644 --- a/CRM/Core/OptionValue.php +++ b/CRM/Core/OptionValue.php @@ -323,6 +323,7 @@ class CRM_Core_OptionValue { $title = array( 'gender' => array( 'name' => 'gender', + 'dbName' => 'gender_id', 'title' => ts('Gender'), 'headerPattern' => '/^gender$/i', 'pseudoconstant' => $contactFields['gender_id']['pseudoconstant'], @@ -330,6 +331,7 @@ class CRM_Core_OptionValue { ), 'individual_prefix' => array( 'name' => 'individual_prefix', + 'dbName' => 'prefix_id', 'title' => ts('Individual Prefix'), 'headerPattern' => '/^(prefix|title)/i', 'pseudoconstant' => $contactFields['prefix_id']['pseudoconstant'], @@ -337,6 +339,7 @@ class CRM_Core_OptionValue { ), 'individual_suffix' => array( 'name' => 'individual_suffix', + 'dbName' => 'suffix_id', 'title' => ts('Individual Suffix'), 'headerPattern' => '/^suffix$/i', 'pseudoconstant' => $contactFields['suffix_id']['pseudoconstant'],