mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-12-24 02:11:27 +01:00
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:
@@ -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()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user