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

This commit is contained in:
John BOTELLA
2019-03-11 14:40:19 +01:00
141 changed files with 2078 additions and 1519 deletions

View File

@@ -1453,7 +1453,7 @@ function weight_convert($weight, &$from_unit, $to_unit)
* @param array $tab Array (key=>value) with all parameters to save
* @return int <0 if KO, >0 if OK
*
* @see dolibarr_get_const, dolibarr_set_const, dolibarr_del_const
* @see dolibarr_get_const(), dolibarr_set_const(), dolibarr_del_const()
*/
function dol_set_user_param($db, $conf, &$user, $tab)
{
@@ -1553,7 +1553,7 @@ function version_os()
* Return PHP version
*
* @return string PHP version
* @see versionphparray
* @see versionphparray()
*/
function version_php()
{
@@ -1564,7 +1564,7 @@ function version_php()
* Return Dolibarr version
*
* @return string Dolibarr version
* @see versiondolibarrarray
* @see versiondolibarrarray()
*/
function version_dolibarr()
{
@@ -2137,7 +2137,7 @@ function getElementProperties($element_type)
*
* @param int $element_id Element id
* @param string $element_type Element type
* @param ref $element_ref Element ref (Use this if element_id but not both)
* @param string $element_ref Element ref (Use this or element_id but not both)
* @return int|object object || 0 || -1 if error
*/
function fetchObjectByElement($element_id, $element_type, $element_ref = '')
@@ -2167,7 +2167,7 @@ function fetchObjectByElement($element_id, $element_type, $element_ref = '')
* @param array $arraycolor Array
* @param string $colorifnotfound Color code to return if entry not defined or not a RGB format
* @return string RGB hex value (without # before). For example: 'FF00FF', '01FF02'
* @see colorStringToArray
* @see colorStringToArray()
*/
function colorArrayToHex($arraycolor, $colorifnotfound = '888888')
{
@@ -2184,11 +2184,12 @@ function colorArrayToHex($arraycolor, $colorifnotfound = '888888')
* @param string $stringcolor String with hex (FFFFFF) or comma RGB ('255,255,255')
* @param array $colorifnotfound Color code array to return if entry not defined
* @return string RGB hex value (without # before). For example: FF00FF
* @see colorArrayToHex
* @see colorArrayToHex()
*/
function colorStringToArray($stringcolor, $colorifnotfound = array(88,88,88))
{
if (is_array($stringcolor)) return $stringcolor; // If already into correct output format, we return as is
$reg=array();
$tmp=preg_match('/^#?([0-9a-fA-F][0-9a-fA-F])([0-9a-fA-F][0-9a-fA-F])([0-9a-fA-F][0-9a-fA-F])$/', $stringcolor, $reg);
if (! $tmp)
{