Merge pull request #8676 from atm-florian/7.0

fix commonobject double style
This commit is contained in:
Laurent Destailleur 2018-04-27 10:14:13 +02:00 committed by GitHub
commit 8f60bd35a5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View File

@ -4847,7 +4847,8 @@ abstract class CommonObject
$type = 'varchar'; // convert varchar(xx) int varchar
$size = $reg[1];
}
elseif (preg_match('/varchar/', $type)) $type = 'varchar'; // convert varchar(xx) int varchar
elseif (preg_match('/varchar/', $type)) $type = 'varchar'; // convert varchar(xx) into varchar
elseif (preg_match('/double/', $type)) $type = 'double'; // convert double(xx) into double
if (is_array($val['arrayofkeyval'])) $type='select';
if (preg_match('/^integer:(.*):(.*)/i', $val['type'], $reg)) $type='link';
@ -4922,7 +4923,6 @@ abstract class CommonObject
}
}
//var_dump($showsize.' '.$size);
if (in_array($type,array('date','datetime')))
{
$tmp=explode(',',$size);

View File

@ -112,7 +112,7 @@ if (empty($reshook))
{
$error=0;
$permissiontoadd = $user->rights->mymodule->create;
$permissiontoadd = $user->rights->mymodule->write;
$permissiontodelete = $user->rights->mymodule->delete;
$backurlforlist = dol_buildpath('/mymodule/myobject_list.php',1);