fix commonobject isInt for module builder capabilities

This commit is contained in:
Alexis Algoud 2018-03-10 14:14:31 +01:00 committed by Laurent Destailleur
parent 905cf112e9
commit 74dc815bfa

View File

@ -5371,7 +5371,7 @@ abstract class CommonObject
$label = $val['label']; $label = $val['label'];
$type = $val['type']; $type = $val['type'];
$size = $val['css']; $size = $val['css'];
// Convert var to be able to share same code than showOutputField of extrafields // Convert var to be able to share same code than showOutputField of extrafields
if (preg_match('/varchar\((\d+)\)/', $type, $reg)) if (preg_match('/varchar\((\d+)\)/', $type, $reg))
{ {
@ -6047,7 +6047,7 @@ abstract class CommonObject
{ {
if(is_array($info)) if(is_array($info))
{ {
if(isset($info['type']) && ($info['type']=='int' || $info['type']=='integer' )) return true; if(isset($info['type']) && ($info['type']=='int' || preg_match('/^integer/i',$info['type']) ) ) return true;
else return false; else return false;
} }
else return false; else return false;