diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index 40afe9b9dc8..1fabc1a40ec 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -9728,14 +9728,14 @@ function dol_osencode($str) * Return an id or code from a code or id. * Store also Code-Id into a cache to speed up next request on same key. * - * @param DoliDB $db Database handler - * @param string $key Code or Id to get Id or Code - * @param string $tablename Table name without prefix - * @param string $fieldkey Field to search the key into - * @param string $fieldid Field to get - * @param int $entityfilter Filter by entity - * @param string $filters Filters to add. WARNING: string must be escaped for SQL and not coming from user input. - * @return int<-1,max> ID of code if OK, 0 if key empty, -1 if KO + * @param DoliDB $db Database handler + * @param string $key Code or Id to get Id or Code + * @param string $tablename Table name without prefix + * @param string $fieldkey Field to search the key into + * @param string $fieldid Field to get + * @param int $entityfilter Filter by entity + * @param string $filters Filters to add. WARNING: string must be escaped for SQL and not coming from user input. + * @return int<-1,max>|string ID of code if OK, 0 if key empty, -1 if KO * @see $langs->getLabelFromKey */ function dol_getIdFromCode($db, $key, $tablename, $fieldkey = 'code', $fieldid = 'id', $entityfilter = 0, $filters = '')