$note->id = $this->_id;
if ($note->find(TRUE)) {
$values = array();
+
CRM_Core_DAO::storeValues($note, $values);
- $values['privacy'] = CRM_Core_OptionGroup::optionLabel('note_privacy', $values['privacy']);
+ $values['privacy'] = CRM_Core_PseudoConstant::getLabel('CRM_Core_BAO_Note', 'privacy', $values['privacy']);
$this->assign('note', $values);
}
$dao = CRM_Core_DAO::executeQuery($query, $params);
}
- /**
- * @param string $groupName
- * @param $value
- *
- * @return null|string
- */
- public static function optionLabel($groupName, $value) {
- $query = "
-SELECT v.label
- FROM civicrm_option_group g,
- civicrm_option_value v
- WHERE g.id = v.option_group_id
- AND g.name = %1
- AND v.value = %2";
- $params = array(
- 1 => array($groupName, 'String'),
- 2 => array($value, 'String'),
- );
- return CRM_Core_DAO::singleValueQuery($query, $params);
- }
-
/**
* @param string $groupName
* @param $fieldValue