Fix error message with old usage of childtables
This commit is contained in:
parent
ff6ffa4738
commit
ac758e02a9
@ -3322,7 +3322,14 @@ abstract class CommonObject
|
|||||||
$langs->load("errors");
|
$langs->load("errors");
|
||||||
//print 'Found into table '.$table.', type '.$langs->transnoentitiesnoconv($elementname).', haschild='.$haschild;
|
//print 'Found into table '.$table.', type '.$langs->transnoentitiesnoconv($elementname).', haschild='.$haschild;
|
||||||
$haschild += $obj->nb;
|
$haschild += $obj->nb;
|
||||||
$this->errors[]=$langs->trans("ErrorRecordHasAtLeastOneChildOfType", $langs->transnoentitiesnoconv($elementname));
|
if (is_numeric($elementname)) // old usage
|
||||||
|
{
|
||||||
|
$this->errors[]=$langs->trans("ErrorRecordHasAtLeastOneChildOfType", $table);
|
||||||
|
}
|
||||||
|
else // new usage: $elementname=Translation key
|
||||||
|
{
|
||||||
|
$this->errors[]=$langs->trans("ErrorRecordHasAtLeastOneChildOfType", $langs->transnoentitiesnoconv($elementname));
|
||||||
|
}
|
||||||
break; // We found at least one, we stop here
|
break; // We found at least one, we stop here
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user