From 6d83b4ca94d632e051793bad54d58dbd71a35316 Mon Sep 17 00:00:00 2001 From: Coleman Watts Date: Mon, 29 Jul 2013 10:29:56 -0700 Subject: [PATCH] Pass context from pseudoconstant getKey/getValue CRM-12464 ---------------------------------------- * CRM-12464: Add PseudoConstants to Schema Metadata http://issues.civicrm.org/jira/browse/CRM-12464 --- CRM/Core/PseudoConstant.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/CRM/Core/PseudoConstant.php b/CRM/Core/PseudoConstant.php index cf7df6d713..097cfa3d3b 100644 --- a/CRM/Core/PseudoConstant.php +++ b/CRM/Core/PseudoConstant.php @@ -453,7 +453,7 @@ class CRM_Core_PseudoConstant { * String if label is found */ static function getValue($daoName, $fieldName, $key, $params = array()) { - $values = self::get($daoName, $fieldName, $params); + $values = self::get($daoName, $fieldName, $params, 'get'); if ($values === FALSE) { return FALSE; } @@ -461,7 +461,7 @@ class CRM_Core_PseudoConstant { } /** - * Fetch the key for a field option given its label/name + * Fetch the key for a field option given its name * * @param String $daoName * @param String $fieldName @@ -474,7 +474,7 @@ class CRM_Core_PseudoConstant { * String|Number if key is found */ static function getKey($daoName, $fieldName, $value, $params = array()) { - $values = self::get($daoName, $fieldName, $params); + $values = self::get($daoName, $fieldName, $params, 'validate'); if ($values === FALSE) { return FALSE; } -- 2.25.1