Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop

This commit is contained in:
Laurent Destailleur 2019-01-07 18:09:35 +01:00
commit b7c73d9460
2 changed files with 2 additions and 2 deletions

View File

@ -4582,7 +4582,7 @@ else if ($id > 0 || ! empty($ref))
$ret = $object->printObjectLines($action, $mysoc, $soc, $lineid, 1);
// Form to add new line
if ($object->statut == 0 && $usercancreate && $action != 'valid' && $action != 'editline' && ($object->is_first() || !$object->situation_cycle_ref))
if ($object->statut == 0 && $usercancreate && $action != 'valid' && $action != 'editline')
{
if ($action != 'editline' && $action != 'selectlines')
{

View File

@ -235,7 +235,7 @@ function run_sql($sqlfile, $silent=1, $entity='', $usesavepoint=1, $handler='',
$newsql=$sql;
// Replace __+MAX_table__ with max of table
while (preg_match('/__\+MAX_([A-Za-z_]+)__/i',$newsql,$reg))
while (preg_match('/__\+MAX_([A-Za-z0-9_]+)__/i',$newsql,$reg))
{
$table=$reg[1];
if (! isset($listofmaxrowid[$table]))