Merge branch 'develop' into prod-attr

# Conflicts:
#	htdocs/core/class/html.form.class.php
#	htdocs/core/tpl/objectline_create.tpl.php
#	htdocs/install/mysql/migration/3.9.0-4.0.0.sql
#	htdocs/install/mysql/migration/4.0.0-5.0.0.sql
This commit is contained in:
Marcos García de La Fuente
2016-09-06 21:06:33 +02:00
1245 changed files with 32172 additions and 16207 deletions

View File

@@ -119,12 +119,14 @@ function dolGetModulesDirs($subdir='')
* @param Translate $outputlangs Output lang to use to autodetect output format if setup not done
* @return string Default paper format code
*/
function dol_getDefaultFormat($outputlangs='')
function dol_getDefaultFormat(Translate $outputlangs = null)
{
global $langs;
$selected='EUA4';
if (empty($outputlangs) || ! is_object($outputlangs)) $outputlangs=$langs;
if (!$outputlangs) {
$outputlangs=$langs;
}
if ($outputlangs->defaultlang == 'ca_CA') $selected='CAP4'; // Canada
if ($outputlangs->defaultlang == 'en_US') $selected='USLetter'; // US
@@ -1577,7 +1579,8 @@ function getListOfModels($db,$type,$maxfilenamelength=0)
/**
* This function evaluates a string that should be a valid IPv4
*
* Note: For ip 169.254.0.0, it returns 0 with some PHP (5.6.24) and 2 with some minor patchs of PHP (5.6.25). See https://github.com/php/php-src/pull/1954.
*
* @param string $ip IP Address
* @return int 0 if not valid or reserved range, 1 if valid and public IP, 2 if valid and private range IP
*/
@@ -1617,7 +1620,7 @@ function dol_buildlogin($lastname,$firstname)
/**
* Return array to use for SoapClient constructor
*
* @return param
* @return array
*/
function getSoapParams()
{