projects
/
civicrm-core.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
CRM-21466 follow up, add unit test to ensure custom fields can be populated.
[civicrm-core.git]
/
CRM
/
Core
/
OptionGroup.php
diff --git
a/CRM/Core/OptionGroup.php
b/CRM/Core/OptionGroup.php
index 1227803a5fbeb173d2898a5d63ec81e80e4e0118..250c93cff309723831aec292d907c1066d97aec0 100644
(file)
--- a/
CRM/Core/OptionGroup.php
+++ b/
CRM/Core/OptionGroup.php
@@
-342,6
+342,7
@@
WHERE v.option_group_id = g.id
* @return null
*/
public static function getLabel($groupName, $value, $onlyActiveValue = TRUE) {
* @return null
*/
public static function getLabel($groupName, $value, $onlyActiveValue = TRUE) {
+ Civi::log()->warning('Deprecated function, use CRM_Core_PseudoConstant::getLabel', array('civi.tag' => 'deprecated'));
if (empty($groupName) ||
empty($value)
) {
if (empty($groupName) ||
empty($value)
) {
@@
-395,6
+396,8
@@
WHERE v.option_group_id = g.id
return NULL;
}
return NULL;
}
+ Civi::log()->warning('Deprecated function, use CRM_Core_PseudoConstant::getKey', array('civi.tag' => 'deprecated'));
+
$query = "
SELECT v.label as label ,v.{$valueField} as value
FROM civicrm_option_value v,
$query = "
SELECT v.label as label ,v.{$valueField} as value
FROM civicrm_option_value v,
@@
-673,6
+676,12
@@
WHERE v.option_group_id = g.id
);
}
);
}
+ /**
+ * Flush all the places where option values are cached.
+ *
+ * Note that this is called from CRM_Core_PseudoConstant::flush() so we should resist
+ * the intuitive urge to flush that class.
+ */
public static function flushAll() {
self::$_values = array();
self::$_cache = array();
public static function flushAll() {
self::$_values = array();
self::$_cache = array();