mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-12-31 06:04:54 +01:00
Miscellaneous fixes
This commit is contained in:
@@ -1009,26 +1009,26 @@ function dol_format_address($object,$withcountry=0,$sep="\n",$outputlangs='')
|
||||
global $conf,$langs;
|
||||
|
||||
$ret='';
|
||||
$countriesusingstate=array('AU','US','IN','GB','ES','UK','TR'); // See also MAIN_FORCE_STATE_INTO_ADDRESS
|
||||
$countriesusingstate=array('AU','CA','US','IN','GB','ES','UK','TR'); // See also MAIN_FORCE_STATE_INTO_ADDRESS
|
||||
|
||||
// Address
|
||||
$ret .= $object->address;
|
||||
// Zip/Town/State
|
||||
if (in_array($object->country_code,array('US','AU')) || ! empty($conf->global->MAIN_FORCE_STATE_INTO_ADDRESS)) // US: title firstname name \n address lines \n town, state, zip \n country
|
||||
if (in_array($object->country_code,array('AU', 'CA', 'US')) || ! empty($conf->global->MAIN_FORCE_STATE_INTO_ADDRESS)) // US: title firstname name \n address lines \n town, state, zip \n country
|
||||
{
|
||||
$ret .= ($ret ? $sep : '' ).$object->town;
|
||||
if ($object->state)
|
||||
{
|
||||
$ret.=", ".$object->state;
|
||||
$ret.=($ret?", ":'').$object->state;
|
||||
}
|
||||
if ($object->zip) $ret .= ', '.$object->zip;
|
||||
if ($object->zip) $ret .= ($ret?", ":'').$object->zip;
|
||||
}
|
||||
else if (in_array($object->country_code,array('GB','UK'))) // UK: title firstname name \n address lines \n town state \n zip \n country
|
||||
{
|
||||
$ret .= ($ret ? $sep : '' ).$object->town;
|
||||
if ($object->state)
|
||||
{
|
||||
$ret.=", ".$object->state;
|
||||
$ret.=($ret?", ":'').$object->state;
|
||||
}
|
||||
if ($object->zip) $ret .= ($ret ? $sep : '' ).$object->zip;
|
||||
}
|
||||
@@ -5603,7 +5603,7 @@ function natural_search($fields, $value, $mode=0, $nofirstand=0)
|
||||
*
|
||||
* @param string $file Original filename (full or relative path)
|
||||
* @param string $extName Extension to differenciate thumb file name ('', '_small', '_mini')
|
||||
* @param string $extImgTarget Force image extension for thumbs. Use '' to keep same extension than original image. Use '.png' for generated thumb files.
|
||||
* @param string $extImgTarget Force image extension for thumbs. Use '' to keep same extension than original image (default).
|
||||
* @return string New file name (full or relative path, including the thumbs/)
|
||||
*/
|
||||
function getImageFileNameForSize($file, $extName, $extImgTarget='')
|
||||
|
||||
Reference in New Issue
Block a user