[Vtigercrm-developers] I found a bug in 5.4

Adrián Granado - Refineria Web adrian at refineriaweb.com
Fri Aug 17 05:51:05 PDT 2012


Ok i think I got a better solution:

File: \modules\PickList\PickListUtils.php

 

Add in line 184: 

global $default_charset;

Modify line 212: 

$arr[$pick_val] = $lang[$pick_val];
with: 

$arr[$pick_val] =
html_entity_decode($lang[$pick_val],ENT_QUOTES,$default_charset);

 

Modify line 214:

$arr[$pick_val] = $pick_val;

with: 

$arr[$pick_val] = html_entity_decode($pick_val,ENT_QUOTES,$default_charset);

 

If anyone knows better solution, share with us, thanks!

 

 

De: vtigercrm-developers-bounces at lists.vtigercrm.com
[mailto:vtigercrm-developers-bounces at lists.vtigercrm.com] En nombre de
Adrián Granado - Refineria Web
Enviado el: viernes, 17 de agosto de 2012 14:34
Para: vtigercrm-developers at lists.vtigercrm.com
Asunto: [Vtigercrm-developers] I found a bug in 5.4

 

The problem is when in a picklist you create a registry with special
caracter, vTiger says “Not accessible” just like this (when you enter with a
non-admin user):

 <http://i.imgur.com/7A9Tv.png> http://i.imgur.com/7A9Tv.png

In \include\ListView\ListViewController.php in line 201, you have this line:

 

$value = html_entity_decode($rawValue,ENT_QUOTES,$default_charset);
//Example: Mar &iacute;a to María

 

Then, in the line 303 you are comparing $value to
$this->picklistValueMap[$fieldName])) just like this:

 

!in_array($value, $this->picklistValueMap[$fieldName]))

 

So you are comparing “Mar &iacute;a” to “María” and this returns false

 

I changed last line for this and all is working but I think isn’t the best
solution,

 

!in_array($rawValue, $this->picklistValueMap[$fieldName]))

 

Better solutions? J

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.vtigercrm.com/pipermail/vtigercrm-developers/attachments/20120817/1efd6d01/attachment.html 


More information about the vtigercrm-developers mailing list