Skip to content

Commit

Permalink
Merge pull request civicrm#23 from colemanw/pseudoConstant-d6
Browse files Browse the repository at this point in the history
Refactor pseudoconstants CRM-12464
  • Loading branch information
kurund committed May 30, 2013
2 parents 1be3ff4 + 8469af0 commit 0ca530f
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
2 changes: 1 addition & 1 deletion modules/civicrm_engage/Engage/Report/Form/CallList.php
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@ function type2str($type) {

function alterDisplay(&$rows) {
// custom code to alter rows
$genderList = CRM_Core_PseudoConstant::gender();
$genderList = CRM_Core_PseudoConstant::get('CRM_Contact_DAO_Contact', 'gender_id');
$entryFound = FALSE;
foreach ($rows as $rowNum => $row) {
// handle state province
Expand Down
6 changes: 3 additions & 3 deletions modules/civicrm_engage/Engage/Report/Form/WalkList.php
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ function __construct() {
array('title' => ts('Sex'),
'operatorType' => CRM_Report_Form::OP_SELECT,
'type' => CRM_Report_Form::OP_STRING,
'options' => array('' => '') + CRM_Core_PseudoConstant::gender(),
'options' => array('' => '') + CRM_Core_PseudoConstant::get('CRM_Contact_DAO_Contact', 'gender_id'),
),
'sort_name' =>
array('title' => ts('Contact Name'),
Expand Down Expand Up @@ -314,7 +314,7 @@ function alterDisplay(&$rows) {
}
// custom code to alter rows
//var_dump($rows);
$genderList = CRM_Core_PseudoConstant::gender();
$genderList = CRM_Core_PseudoConstant::get('CRM_Contact_DAO_Contact', 'gender_id');
$entryFound = FALSE;
foreach ($rows as $rowNum => $row) {
// handle state province
Expand Down Expand Up @@ -424,7 +424,7 @@ function executePrintmode($rows) {
DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci";
CRM_Core_DAO::executeQuery($sql);

$gender = CRM_Core_PseudoConstant::gender();
$gender = CRM_Core_PseudoConstant::get('CRM_Contact_DAO_Contact', 'gender_id');

foreach ($rows as $key => $value) {

Expand Down
3 changes: 1 addition & 2 deletions modules/views/civicrm/civicrm_handler_field_phone.inc
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@ class civicrm_handler_field_phone extends views_handler_field {
if (!civicrm_initialize()) {
return;
}
require_once 'CRM/Core/PseudoConstant.php';
self::$_phoneType = CRM_Core_PseudoConstant::phoneType();
self::$_phoneType = CRM_Core_PseudoConstant::get('CRM_Core_DAO_Phone', 'phone_type_id');
}
}

Expand Down

0 comments on commit 0ca530f

Please sign in to comment.