From bc0f48721beb4a9e3e171bc49bee058540997d64 Mon Sep 17 00:00:00 2001 From: Denis Flaven Date: Thu, 6 Feb 2014 09:22:35 +0000 Subject: [PATCH] Bug fix: the JSON value for an enum should be the raw value, not its translated label. SVN:trunk[3077] --- core/attributedef.class.inc.php | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/core/attributedef.class.inc.php b/core/attributedef.class.inc.php index e54f83741..bb403a9da 100644 --- a/core/attributedef.class.inc.php +++ b/core/attributedef.class.inc.php @@ -2365,6 +2365,15 @@ class AttributeEnum extends AttributeString } } + /** + * Helper to get a value that will be JSON encoded + * The operation is the opposite to FromJSONToValue + */ + public function GetForJSON($value) + { + return $value; + } + public function GetAllowedValues($aArgs = array(), $sContains = '') { $aRawValues = parent::GetAllowedValues($aArgs, $sContains);