diff --git a/htdocs/core/class/commonobject.class.php b/htdocs/core/class/commonobject.class.php index 994c7654614..c194a5abb40 100644 --- a/htdocs/core/class/commonobject.class.php +++ b/htdocs/core/class/commonobject.class.php @@ -442,6 +442,7 @@ abstract class CommonObject * * @param int $withcountry 1=Add country into address string * @param string $sep Separator to use to build string + * @param int $withregion 1=Add region into address string * @return string Full address string */ function getFullAddress($withcountry=0,$sep="\n",$withregion=0) diff --git a/htdocs/core/lib/company.lib.php b/htdocs/core/lib/company.lib.php index 5a6a1bf6944..e041e489499 100644 --- a/htdocs/core/lib/company.lib.php +++ b/htdocs/core/lib/company.lib.php @@ -383,15 +383,19 @@ function getCountry($searchkey,$withcode='',$dbtouse=0,$outputlangs='',$entconv= /** * Return state translated from an id. Return value is always utf8 encoded and without entities. * - * @param int $id id of state (province/departement) + * @param int $id id of state (province/departement) * @param int $withcode '0'=Return label, * '1'=Return string code + label, * '2'=Return code, * 'all'=return array('id'=>,'code'=>,'label'=>) + * @param int $withregion '0'=Ignores region, + * '1'=Add region name/code/id as needed to output, * @param DoliDB $dbtouse Database handler (using in global way may fail because of conflicts with some autoload features) - * @return string String with state code or state name (Return value is always utf8 encoded and without entities) + * @param Translate $outputlangs Langs object for output translation, not fully implemented yet + * @param int $entconv 0=Return value without entities and not converted to output charset, 1=Ready for html output + * @return mixed String with state code or state name or Array('id','code','label')/Array('id','code','label','region_code','region') */ -function getState($id,$withcode='',$dbtouse=0,$withregion='',$outputlangs='',$entconv=1,$searchlabel='') +function getState($id,$withcode='',$dbtouse=0,$withregion='',$outputlangs='',$entconv=1) { global $db,$langs;