Skip to content
Snippets Groups Projects
Commit 428a8528 authored by Prasad's avatar Prasad
Browse files

Merge branch '236' into 'master'

Fixes #236 - MultiPickList values aren't translated in detail view 6.4.0

See merge request !107
parents 100325c0 af5985d9
No related branches found
No related tags found
No related merge requests found
...@@ -24,13 +24,20 @@ class Vtiger_Multipicklist_UIType extends Vtiger_Base_UIType { ...@@ -24,13 +24,20 @@ class Vtiger_Multipicklist_UIType extends Vtiger_Base_UIType {
* @return <Object> * @return <Object>
*/ */
public function getDisplayValue($value) { public function getDisplayValue($value) {
if(is_array($value)){ if (!is_array($value)) {
$value = implode(' |##| ', $value); $value = explode(' |##| ', $value);
} }
$moduleName = $this->get('field')->getModuleName();
foreach ($value as $key => $picklistValue) {
$value[$key] = vtranslate($picklistValue, $moduleName);
}
$value = implode(' |##| ', $value);
return str_ireplace(' |##| ', ', ', $value); return str_ireplace(' |##| ', ', ', $value);
} }
public function getDBInsertValue($value) { public function getDBInsertValue($value) {
if(is_array($value)){ if(is_array($value)){
$value = implode(' |##| ', $value); $value = implode(' |##| ', $value);
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment