From a1ae920b4acaa581b0eec5a04ff07118c27cb70c Mon Sep 17 00:00:00 2001 From: Drosis Nikos Date: Mon, 5 Oct 2015 17:46:02 +0300 Subject: [PATCH 1/5] For devices not supporting unicode characters --- htdocs/asterisk/cidlookup.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/htdocs/asterisk/cidlookup.php b/htdocs/asterisk/cidlookup.php index ef4eaefe9c2..771b2e29979 100644 --- a/htdocs/asterisk/cidlookup.php +++ b/htdocs/asterisk/cidlookup.php @@ -30,7 +30,7 @@ include '../master.inc.php'; $phone = GETPOST('phone'); -$notfound = $langs->trans("Unknown"); +$notfound = $phone; // Security check if (empty($conf->clicktodial->enabled)) @@ -73,5 +73,9 @@ else dol_print_error($db,'Error'); $found = 'Error'; } +//Greek to Latin +$greek = array('α','β','γ','δ','ε','ζ','η','θ','ι','κ','λ','μ','ν','ξ','ο','π','ρ','ς','σ','τ','υ','φ','χ','ψ','ω','Α','Β','Γ','Δ','Ε','Ζ','Η','Θ','Ι','Κ','Λ','Μ','Ν','Ξ','Ο','Π','Ρ','Σ','Τ','Υ','Φ','Χ','Ψ','Ω','ά','έ','ή','ί','ό','ύ','ώ','ϊ','ΐ','Ά','Έ','Ή','Ί','Ό','Ύ','Ώ','Ϊ'); -echo $found; +$latin = array('a','b','g','d','e','z','h','th','i','k','l','m','n','ks','o','p','r','s','s','t','u','f','ch','ps','w','A','B','G','D','E','Z','H','TH','I','K','L','M','N','KS','O','P','R','S','T','U','F','CH','PS','W','a','e','h','i','o','u','w','i','i','A','E','H','I','O','U','W','I'); + +print str_replace($greek, $latin, $found); From 7065b2aa7deddb70211eda71e233b42dda62d249 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Sat, 10 Oct 2015 12:59:58 +0200 Subject: [PATCH 2/5] Update account.php --- htdocs/compta/bank/account.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/compta/bank/account.php b/htdocs/compta/bank/account.php index deed3b1b97a..9a04a431ac6 100644 --- a/htdocs/compta/bank/account.php +++ b/htdocs/compta/bank/account.php @@ -952,7 +952,7 @@ if ($id > 0 || ! empty($ref)) if ($sep > 0) print ' '; // If we had at least one line in future else print $langs->trans("CurrentBalance"); print ' '.$object->currency_code.''; - print ''.price($solde, 0, $langs, 0, 0, -1, $object->currency_code).''; + print ''.price($total, 0, $langs, 0, 0, -1, $object->currency_code).''; print ' '; print ''; } else { From b6b410a99c32082b95b1b0bda013a0698ef0a970 Mon Sep 17 00:00:00 2001 From: Drosis Nikos Date: Sat, 10 Oct 2015 16:01:39 +0300 Subject: [PATCH 3/5] Update cidlookup.php --- htdocs/asterisk/cidlookup.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/asterisk/cidlookup.php b/htdocs/asterisk/cidlookup.php index 771b2e29979..e50a1a74a1b 100644 --- a/htdocs/asterisk/cidlookup.php +++ b/htdocs/asterisk/cidlookup.php @@ -30,7 +30,7 @@ include '../master.inc.php'; $phone = GETPOST('phone'); -$notfound = $phone; +$notfound = $langs->trans("Unknown"); // Security check if (empty($conf->clicktodial->enabled)) From fb50daaa40962bebd96f289b91471ef6c4dc784d Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 10 Oct 2015 16:09:01 +0200 Subject: [PATCH 4/5] Fix bad parameter --- htdocs/core/lib/company.lib.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/lib/company.lib.php b/htdocs/core/lib/company.lib.php index d7fbaedfeba..565078a9d3b 100644 --- a/htdocs/core/lib/company.lib.php +++ b/htdocs/core/lib/company.lib.php @@ -706,7 +706,7 @@ function show_contacts($conf,$langs,$db,$object,$backtopage='') $contactstatic->web = $obj->web; $contactstatic->skype = $obj->skype; - $country_code = getCountry($obj->country_id, 'all'); + $country_code = getCountry($obj->country_id, 2); $contactstatic->country_code = $country_code; print ""; From 525f9841faf80f5ff915bbc23c3de24286511a26 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 10 Oct 2015 18:38:22 +0200 Subject: [PATCH 5/5] Fix doxygen --- htdocs/core/class/commonobject.class.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/htdocs/core/class/commonobject.class.php b/htdocs/core/class/commonobject.class.php index 76fd73a324d..a4bacf4d34c 100644 --- a/htdocs/core/class/commonobject.class.php +++ b/htdocs/core/class/commonobject.class.php @@ -437,10 +437,11 @@ abstract class CommonObject /** * Return full address of contact * - * @param Societe $object Object Societe or null + * @param string $htmlkey HTML id to make banner content unique + * @param Object $object Object (thirdparty, thirdparty of contact for contact, null for a member) * @return string Full address string */ - function getBannerAddress($htmlkey, $object=null) + function getBannerAddress($htmlkey, $object) { global $conf, $langs; @@ -465,7 +466,7 @@ abstract class CommonObject $outdone++; } - if (! in_array($object->country_code,$countriesusingstate) && empty($conf->global->MAIN_FORCE_STATE_INTO_ADDRESS) + if (! in_array($this->country_code,$countriesusingstate) && empty($conf->global->MAIN_FORCE_STATE_INTO_ADDRESS) && ! empty($conf->global->SOCIETE_DISABLE_STATE) && $this->state) { $out.=($outdone?'
':'').$this->state;