From cddd59d98dfbe2f51c702445cb06c096a385b093 Mon Sep 17 00:00:00 2001 From: Grand Philippe Date: Fri, 15 Feb 2013 14:23:35 +0100 Subject: [PATCH 1/7] fix : doesnt work with a \/ --- htdocs/langs/fr_FR/admin.lang | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/langs/fr_FR/admin.lang b/htdocs/langs/fr_FR/admin.lang index 802bbb28191..d5c0daa97b8 100644 --- a/htdocs/langs/fr_FR/admin.lang +++ b/htdocs/langs/fr_FR/admin.lang @@ -283,7 +283,7 @@ GenericMaskCodes3= Tout autre caractère dans le masque sera laissé inchangé.< GenericMaskCodes4a= Exemple sur la 99eme %s du tiers LaCompanie faite le 31/03/2007:
GenericMaskCodes4b= Exemple sur un tiers créé le 31/03/2007:
GenericMaskCodes4c= Exemple sur un produit/service créé le 31/03/2007:
-GenericMaskCodes5= ABC{yy}{mm}-{000000} donnera ABC0703-000099
{0000+100}-XXX/{dd}/YYY donnera 0199-XXX/31/YYY +GenericMaskCodes5= ABC{yy}{mm}-{000000} donnera ABC0703-000099
{0000+100}-XXX-{dd}-YYY donnera 0199-XXX-31-YYY GenericNumRefModelDesc= Renvoie un numéro personnalisable selon un masque à définir. ServerAvailableOnIPOrPort= Serveur disponible à l'adresse %s sur le port %s ServerNotAvailableOnIPOrPort= Serveur non disponible à l'adresse %s sur le port %s From 7c1a4e6fdf49d4516adbfc338a6eaf8948843374 Mon Sep 17 00:00:00 2001 From: Grand Philippe Date: Fri, 15 Feb 2013 15:48:53 +0100 Subject: [PATCH 2/7] fix trad to get better understanding --- htdocs/core/class/commonobject.class.php | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/htdocs/core/class/commonobject.class.php b/htdocs/core/class/commonobject.class.php index 5c9b8d93122..5d6d869ad81 100644 --- a/htdocs/core/class/commonobject.class.php +++ b/htdocs/core/class/commonobject.class.php @@ -1023,7 +1023,7 @@ abstract class CommonObject /** * Save a new position (field rang) for details lines. - * You can choose to ser position for lines with already a position or lines wihtout any position defined. + * You can choose to set position for lines with already a position or lines without any position defined. * Call this function only for table that contains a field fk_parent_line. * * @param boolean $renum true to renum all already ordered lines, false to renum only not already ordered lines. @@ -1064,7 +1064,7 @@ abstract class CommonObject // counter that parents. $rows=array(); - // We frist search all lines that are parent lines (for multilevel details lines) + // We first search all lines that are parent lines (for multilevel details lines) $sql = 'SELECT rowid FROM '.MAIN_DB_PREFIX.$this->table_element_line; $sql.= ' WHERE '.$this->fk_element.' = '.$this->id; $sql.= ' AND fk_parent_line IS NULL'; @@ -1080,10 +1080,10 @@ abstract class CommonObject { $row = $this->db->fetch_row($resql); $rows[] = $row[0]; // Add parent line into array rows - $childrens = $this->getChildrensOfLine($row[0]); - if (! empty($childrens)) + $childrens = $this->getChildrenOfLine($row[0]); + if (! empty($children)) { - foreach($childrens as $child) + foreach($children as $child) { array_push($rows, $child); } @@ -1108,12 +1108,12 @@ abstract class CommonObject } /** - * Get childrens of line + * Get children of line * * @param int $id Id of parent line - * @return array Array with list of child lines id + * @return array Array with list of children lines id */ - function getChildrensOfLine($id) + function getChildrenOfLine($id) { $rows=array(); @@ -1122,7 +1122,7 @@ abstract class CommonObject $sql.= ' AND fk_parent_line = '.$id; $sql.= ' ORDER BY rang ASC'; - dol_syslog(get_class($this)."::getChildrenOfLines search children lines for line ".$id." sql=".$sql, LOG_DEBUG); + dol_syslog(get_class($this)."::getChildrenOfLine search children lines for line ".$id." sql=".$sql, LOG_DEBUG); $resql = $this->db->query($sql); if ($resql) { From 7c47dedbcee621211216c8ce3c3db316ec1ebfb6 Mon Sep 17 00:00:00 2001 From: Grand Philippe Date: Fri, 15 Feb 2013 17:33:07 +0100 Subject: [PATCH 3/7] fix trad: begin change address instead of adresse --- htdocs/adherents/class/adherent.class.php | 10 +++++----- htdocs/adherents/fiche.php | 4 ++-- htdocs/adherents/liste.php | 2 +- htdocs/adherents/type.php | 2 +- htdocs/core/modules/modAdherent.class.php | 10 +++++----- htdocs/install/mysql/tables/llx_adherent.sql | 2 +- 6 files changed, 15 insertions(+), 15 deletions(-) diff --git a/htdocs/adherents/class/adherent.class.php b/htdocs/adherents/class/adherent.class.php index 0eea1c6f5d7..8e9c75e2423 100644 --- a/htdocs/adherents/class/adherent.class.php +++ b/htdocs/adherents/class/adherent.class.php @@ -51,7 +51,7 @@ class Adherent extends CommonObject var $login; var $pass; var $societe; - var $adresse; + //var $adresse; var $address; var $cp; var $zip; @@ -429,7 +429,7 @@ class Adherent extends CommonObject $sql.= ", login=" .($this->login?"'".$this->db->escape($this->login)."'":"null"); $sql.= ", societe=" .($this->societe?"'".$this->db->escape($this->societe)."'":"null"); $sql.= ", fk_soc=" .($this->fk_soc > 0?"'".$this->fk_soc."'":"null"); - $sql.= ", adresse=" .($this->address?"'".$this->db->escape($this->address)."'":"null"); + $sql.= ", address=" .($this->address?"'".$this->db->escape($this->address)."'":"null"); $sql.= ", cp=" .($this->zip?"'".$this->db->escape($this->zip)."'":"null"); $sql.= ", ville=" .($this->town?"'".$this->db->escape($this->town)."'":"null"); $sql.= ", pays=" .($this->country_id>0?"'".$this->country_id."'":"null"); @@ -1019,7 +1019,7 @@ class Adherent extends CommonObject { global $langs; - $sql = "SELECT d.rowid, d.civilite, d.prenom as firstname, d.nom as lastname, d.societe, d.fk_soc, d.statut, d.public, d.adresse as address, d.cp as zip, d.ville as town, d.note,"; + $sql = "SELECT d.rowid, d.civilite, d.prenom as firstname, d.nom as lastname, d.societe, d.fk_soc, d.statut, d.public, d.address, d.cp as zip, d.ville as town, d.note,"; $sql.= " d.email, d.phone, d.phone_perso, d.phone_mobile, d.login, d.pass,"; $sql.= " d.photo, d.fk_adherent_type, d.morphy, d.entity,"; $sql.= " d.datec as datec,"; @@ -1065,7 +1065,7 @@ class Adherent extends CommonObject $this->pass = $obj->pass; $this->societe = $obj->societe; $this->fk_soc = $obj->fk_soc; - $this->adresse = $obj->address; // deprecated + //$this->adresse = $obj->address; // deprecated $this->address = $obj->address; $this->cp = $obj->zip; // deprecated $this->zip = $obj->zip; @@ -1824,7 +1824,7 @@ class Adherent extends CommonObject if ($this->login && ! empty($conf->global->LDAP_MEMBER_FIELD_LOGIN)) $info[$conf->global->LDAP_MEMBER_FIELD_LOGIN] = $this->login; if ($this->pass && ! empty($conf->global->LDAP_MEMBER_FIELD_PASSWORD)) $info[$conf->global->LDAP_MEMBER_FIELD_PASSWORD] = $this->pass; // this->pass = mot de passe non crypte if ($this->poste && ! empty($conf->global->LDAP_MEMBER_FIELD_TITLE)) $info[$conf->global->LDAP_MEMBER_FIELD_TITLE] = $this->poste; - if ($this->adresse && ! empty($conf->global->LDAP_MEMBER_FIELD_ADDRESS)) $info[$conf->global->LDAP_MEMBER_FIELD_ADDRESS] = $this->adresse; + if ($this->address && ! empty($conf->global->LDAP_MEMBER_FIELD_ADDRESS)) $info[$conf->global->LDAP_MEMBER_FIELD_ADDRESS] = $this->address; if ($this->cp && ! empty($conf->global->LDAP_MEMBER_FIELD_ZIP)) $info[$conf->global->LDAP_MEMBER_FIELD_ZIP] = $this->cp; if ($this->ville && ! empty($conf->global->LDAP_MEMBER_FIELD_TOWN)) $info[$conf->global->LDAP_MEMBER_FIELD_TOWN] = $this->ville; if ($this->country_code && ! empty($conf->global->LDAP_MEMBER_FIELD_COUNTRY)) $info[$conf->global->LDAP_MEMBER_FIELD_COUNTRY] = $this->country_code; diff --git a/htdocs/adherents/fiche.php b/htdocs/adherents/fiche.php index f84990b94e5..d1c8beb6426 100644 --- a/htdocs/adherents/fiche.php +++ b/htdocs/adherents/fiche.php @@ -259,7 +259,7 @@ if ($action == 'update' && ! $_POST["cancel"] && $user->rights->adherent->creer) $object->pass = trim($_POST["pass"]); $object->societe = trim($_POST["societe"]); - $object->adresse = trim($_POST["address"]); // deprecated + //$object->adresse = trim($_POST["address"]); // deprecated $object->address = trim($_POST["address"]); $object->cp = trim($_POST["zipcode"]); // deprecated $object->zip = trim($_POST["zipcode"]); @@ -440,7 +440,7 @@ if ($action == 'add' && $user->rights->adherent->creer) $object->firstname = $prenom; $object->lastname = $nom; $object->societe = $societe; - $object->adresse = $address; // deprecated + //$object->adresse = $address; // deprecated $object->address = $address; $object->cp = $zip; // deprecated $object->zip = $zip; diff --git a/htdocs/adherents/liste.php b/htdocs/adherents/liste.php index 2363a3529d2..b19fcae8d85 100644 --- a/htdocs/adherents/liste.php +++ b/htdocs/adherents/liste.php @@ -104,7 +104,7 @@ if ($sall) $sql.=" AND ("; if (is_numeric($sall)) $sql.= "d.rowid = ".$sall." OR "; $sql.=" d.prenom LIKE '%".$sall."%' OR d.nom LIKE '%".$sall."%' OR d.societe LIKE '%".$sall."%'"; - $sql.=" OR d.email LIKE '%".$sall."%' OR d.login LIKE '%".$sall."%' OR d.adresse LIKE '%".$sall."%'"; + $sql.=" OR d.email LIKE '%".$sall."%' OR d.login LIKE '%".$sall."%' OR d.address LIKE '%".$sall."%'"; $sql.=" OR d.ville LIKE '%".$sall."%' OR d.note LIKE '%".$sall."%')"; } if ($type > 0) diff --git a/htdocs/adherents/type.php b/htdocs/adherents/type.php index 369f925bc7e..eaddb4866c4 100644 --- a/htdocs/adherents/type.php +++ b/htdocs/adherents/type.php @@ -416,7 +416,7 @@ if ($rowid > 0) if ($sall) { $sql.= " AND (d.prenom LIKE '%".$sall."%' OR d.nom LIKE '%".$sall."%' OR d.societe LIKE '%".$sall."%'"; - $sql.= " OR d.email LIKE '%".$sall."%' OR d.login LIKE '%".$sall."%' OR d.adresse LIKE '%".$sall."%'"; + $sql.= " OR d.email LIKE '%".$sall."%' OR d.login LIKE '%".$sall."%' OR d.address LIKE '%".$sall."%'"; $sql.= " OR d.ville LIKE '%".$sall."%' OR d.note LIKE '%".$sall."%')"; } if ($status != '') diff --git a/htdocs/core/modules/modAdherent.class.php b/htdocs/core/modules/modAdherent.class.php index 281a672c60d..4dea8571657 100644 --- a/htdocs/core/modules/modAdherent.class.php +++ b/htdocs/core/modules/modAdherent.class.php @@ -172,9 +172,9 @@ class modAdherent extends DolibarrModules $this->export_code[$r]=$this->rights_class.'_'.$r; $this->export_label[$r]='MembersAndSubscriptions'; $this->export_permission[$r]=array(array("adherent","export")); - $this->export_fields_array[$r]=array('a.rowid'=>'Id','a.civilite'=>"UserTitle",'a.nom'=>"Lastname",'a.prenom'=>"Firstname",'a.login'=>"Login",'a.morphy'=>'Nature','a.societe'=>'Company','a.adresse'=>"Address",'a.cp'=>"Zip",'a.ville'=>"Town",'a.pays'=>"Country",'a.phone'=>"PhonePro",'a.phone_perso'=>"PhonePerso",'a.phone_mobile'=>"PhoneMobile",'a.email'=>"Email",'a.naiss'=>"Birthday",'a.statut'=>"Status",'a.photo'=>"Photo",'a.note'=>"Note",'a.datec'=>'DateCreation','a.datevalid'=>'DateValidation','a.tms'=>'DateLastModification','a.datefin'=>'DateEndSubscription','ta.rowid'=>'MemberTypeId','ta.libelle'=>'MemberTypeLabel','c.rowid'=>'SubscriptionId','c.dateadh'=>'DateSubscription','c.cotisation'=>'Amount'); - $this->export_TypeFields_array[$r]=array('a.civilite'=>"Text",'a.nom'=>"Text",'a.prenom'=>"Text",'a.login'=>"Text",'a.morphy'=>'Text','a.societe'=>'Text','a.adresse'=>"Text",'a.cp'=>"Text",'a.ville'=>"Text",'a.pays'=>"Text",'a.phone'=>"Text",'a.phone_perso'=>"Text",'a.phone_mobile'=>"Text",'a.email'=>"Text",'a.naiss'=>"Date",'a.statut'=>"Status",'a.note'=>"Text",'a.datec'=>'Date','a.datevalid'=>'Date','a.tms'=>'Date','a.datefin'=>'Date','ta.rowid'=>'List:fk_adherent_type:libelle','ta.libelle'=>'Text','c.dateadh'=>'Date','c.cotisation'=>'Number'); - $this->export_entities_array[$r]=array('a.rowid'=>'member','a.civilite'=>"member",'a.nom'=>"member",'a.prenom'=>"member",'a.login'=>"member",'a.morphy'=>'member','a.societe'=>'member','a.adresse'=>"member",'a.cp'=>"member",'a.ville'=>"member",'a.pays'=>"member",'a.phone'=>"member",'a.phone_perso'=>"member",'a.phone_mobile'=>"member",'a.email'=>"member",'a.naiss'=>"member",'a.statut'=>"member",'a.photo'=>"member",'a.note'=>"member",'a.datec'=>'member','a.datevalid'=>'member','a.tms'=>'member','a.datefin'=>'member','ta.rowid'=>'member_type','ta.libelle'=>'member_type','c.rowid'=>'subscription','c.dateadh'=>'subscription','c.cotisation'=>'subscription'); + $this->export_fields_array[$r]=array('a.rowid'=>'Id','a.civilite'=>"UserTitle",'a.nom'=>"Lastname",'a.prenom'=>"Firstname",'a.login'=>"Login",'a.morphy'=>'Nature','a.societe'=>'Company','a.address'=>"Address",'a.cp'=>"Zip",'a.ville'=>"Town",'a.pays'=>"Country",'a.phone'=>"PhonePro",'a.phone_perso'=>"PhonePerso",'a.phone_mobile'=>"PhoneMobile",'a.email'=>"Email",'a.naiss'=>"Birthday",'a.statut'=>"Status",'a.photo'=>"Photo",'a.note'=>"Note",'a.datec'=>'DateCreation','a.datevalid'=>'DateValidation','a.tms'=>'DateLastModification','a.datefin'=>'DateEndSubscription','ta.rowid'=>'MemberTypeId','ta.libelle'=>'MemberTypeLabel','c.rowid'=>'SubscriptionId','c.dateadh'=>'DateSubscription','c.cotisation'=>'Amount'); + $this->export_TypeFields_array[$r]=array('a.civilite'=>"Text",'a.nom'=>"Text",'a.prenom'=>"Text",'a.login'=>"Text",'a.morphy'=>'Text','a.societe'=>'Text','a.address'=>"Text",'a.cp'=>"Text",'a.ville'=>"Text",'a.pays'=>"Text",'a.phone'=>"Text",'a.phone_perso'=>"Text",'a.phone_mobile'=>"Text",'a.email'=>"Text",'a.naiss'=>"Date",'a.statut'=>"Status",'a.note'=>"Text",'a.datec'=>'Date','a.datevalid'=>'Date','a.tms'=>'Date','a.datefin'=>'Date','ta.rowid'=>'List:fk_adherent_type:libelle','ta.libelle'=>'Text','c.dateadh'=>'Date','c.cotisation'=>'Number'); + $this->export_entities_array[$r]=array('a.rowid'=>'member','a.civilite'=>"member",'a.nom'=>"member",'a.prenom'=>"member",'a.login'=>"member",'a.morphy'=>'member','a.societe'=>'member','a.address'=>"member",'a.cp'=>"member",'a.ville'=>"member",'a.pays'=>"member",'a.phone'=>"member",'a.phone_perso'=>"member",'a.phone_mobile'=>"member",'a.email'=>"member",'a.naiss'=>"member",'a.statut'=>"member",'a.photo'=>"member",'a.note'=>"member",'a.datec'=>'member','a.datevalid'=>'member','a.tms'=>'member','a.datefin'=>'member','ta.rowid'=>'member_type','ta.libelle'=>'member_type','c.rowid'=>'subscription','c.dateadh'=>'subscription','c.cotisation'=>'subscription'); // Add extra fields $sql="SELECT name, label FROM ".MAIN_DB_PREFIX."extrafields WHERE elementtype = 'member'"; $resql=$this->db->query($sql); @@ -207,7 +207,7 @@ class modAdherent extends DolibarrModules $this->import_entities_array[$r]=array(); // We define here only fields that use another icon that the one defined into import_icon $this->import_tables_array[$r]=array('a'=>MAIN_DB_PREFIX.'adherent','extra'=>MAIN_DB_PREFIX.'adherent_extrafields'); $this->import_tables_creator_array[$r]=array('a'=>'fk_user_author'); // Fields to store import user id - $this->import_fields_array[$r]=array('a.civilite'=>"UserTitle",'a.nom'=>"Lastname*",'a.prenom'=>"Firstname",'a.login'=>"Login*","a.pass"=>"Password","a.fk_adherent_type"=>"MemberType*",'a.morphy'=>'Nature*','a.societe'=>'Company','a.adresse'=>"Address",'a.cp'=>"Zip",'a.ville'=>"Town",'a.pays'=>"Country",'a.phone'=>"PhonePro",'a.phone_perso'=>"PhonePerso",'a.phone_mobile'=>"PhoneMobile",'a.email'=>"Email",'a.naiss'=>"Birthday",'a.statut'=>"Status*",'a.photo'=>"Photo",'a.note'=>"Note",'a.datec'=>'DateCreation','a.datefin'=>'DateEndSubscription'); + $this->import_fields_array[$r]=array('a.civilite'=>"UserTitle",'a.nom'=>"Lastname*",'a.prenom'=>"Firstname",'a.login'=>"Login*","a.pass"=>"Password","a.fk_adherent_type"=>"MemberType*",'a.morphy'=>'Nature*','a.societe'=>'Company','a.address'=>"Address",'a.cp'=>"Zip",'a.ville'=>"Town",'a.pays'=>"Country",'a.phone'=>"PhonePro",'a.phone_perso'=>"PhonePerso",'a.phone_mobile'=>"PhoneMobile",'a.email'=>"Email",'a.naiss'=>"Birthday",'a.statut'=>"Status*",'a.photo'=>"Photo",'a.note'=>"Note",'a.datec'=>'DateCreation','a.datefin'=>'DateEndSubscription'); // Add extra fields $sql="SELECT name, label, fieldrequired FROM ".MAIN_DB_PREFIX."extrafields WHERE elementtype = 'member'"; $resql=$this->db->query($sql); @@ -223,7 +223,7 @@ class modAdherent extends DolibarrModules // End add extra fields $this->import_fieldshidden_array[$r]=array('extra.fk_object'=>'lastrowid-'.MAIN_DB_PREFIX.'adherent'); // aliastable.field => ('user->id' or 'lastrowid-'.tableparent) $this->import_regex_array[$r]=array('a.civilite'=>'code@'.MAIN_DB_PREFIX.'c_civilite','a.fk_adherent_type'=>'rowid@'.MAIN_DB_PREFIX.'adherent_type','a.morphy'=>'(phy|mor)','a.statut'=>'^[0|1]','a.datec'=>'^[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9]$','a.datefin'=>'^[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9]$'); - $this->import_examplevalues_array[$r]=array('a.civilite'=>"MR",'a.nom'=>'Smith','a.prenom'=>'John','a.login'=>'jsmith','a.pass'=>'passofjsmith','a.fk_adherent_type'=>'1','a.morphy'=>'"mor" or "phy"','a.societe'=>'JS company','a.adresse'=>'21 jump street','a.cp'=>'55000','a.ville'=>'New York','a.pays'=>'1','a.email'=>'jsmith@example.com','a.naiss'=>'1972-10-10','a.statut'=>"0 or 1",'a.note'=>"This is a comment on member",'a.datec'=>dol_print_date($now,'%Y-%m-%d'),'a.datefin'=>dol_print_date(dol_time_plus_duree($now, 1, 'y'),'%Y-%m-%d')); + $this->import_examplevalues_array[$r]=array('a.civilite'=>"MR",'a.nom'=>'Smith','a.prenom'=>'John','a.login'=>'jsmith','a.pass'=>'passofjsmith','a.fk_adherent_type'=>'1','a.morphy'=>'"mor" or "phy"','a.societe'=>'JS company','a.address'=>'21 jump street','a.cp'=>'55000','a.ville'=>'New York','a.pays'=>'1','a.email'=>'jsmith@example.com','a.naiss'=>'1972-10-10','a.statut'=>"0 or 1",'a.note'=>"This is a comment on member",'a.datec'=>dol_print_date($now,'%Y-%m-%d'),'a.datefin'=>dol_print_date(dol_time_plus_duree($now, 1, 'y'),'%Y-%m-%d')); } diff --git a/htdocs/install/mysql/tables/llx_adherent.sql b/htdocs/install/mysql/tables/llx_adherent.sql index 3ab580b5de2..90727f92419 100644 --- a/htdocs/install/mysql/tables/llx_adherent.sql +++ b/htdocs/install/mysql/tables/llx_adherent.sql @@ -39,7 +39,7 @@ create table llx_adherent morphy varchar(3) NOT NULL, -- personne morale / personne physique societe varchar(50), fk_soc integer NULL, -- Link to third party linked to member - adresse text, + address text, cp varchar(30), ville varchar(50), fk_departement integer, From 12317d03711a65d7ae32ff94a1a4f9fba70a1aa6 Mon Sep 17 00:00:00 2001 From: Grand Philippe Date: Fri, 15 Feb 2013 19:18:26 +0100 Subject: [PATCH 4/7] fix trad : change adresse versus address --- htdocs/commande/class/commande.class.php | 8 ++++---- htdocs/install/mysql/tables/llx_commande.sql | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/htdocs/commande/class/commande.class.php b/htdocs/commande/class/commande.class.php index 335757c59d6..15a42841002 100644 --- a/htdocs/commande/class/commande.class.php +++ b/htdocs/commande/class/commande.class.php @@ -66,7 +66,7 @@ class Commande extends CommonOrder var $demand_reason_id; var $demand_reason_code; var $fk_delivery_address; - var $adresse; + var $address; var $date; // Date commande var $date_commande; // Date commande (deprecated) var $date_livraison; // Date livraison souhaitee @@ -631,7 +631,7 @@ class Commande extends CommonOrder $sql = "INSERT INTO ".MAIN_DB_PREFIX."commande ("; $sql.= " ref, fk_soc, date_creation, fk_user_author, fk_projet, date_commande, source, note, note_public, ref_client, ref_int"; - $sql.= ", model_pdf, fk_cond_reglement, fk_mode_reglement, fk_availability, fk_input_reason, date_livraison, fk_adresse_livraison"; + $sql.= ", model_pdf, fk_cond_reglement, fk_mode_reglement, fk_availability, fk_input_reason, date_livraison, fk_delivery_address"; $sql.= ", remise_absolue, remise_percent"; $sql.= ", entity"; $sql.= ")"; @@ -1240,7 +1240,7 @@ class Commande extends CommonOrder $sql.= ', c.date_commande'; $sql.= ', c.date_livraison'; $sql.= ', c.fk_projet, c.remise_percent, c.remise, c.remise_absolue, c.source, c.facture as billed'; - $sql.= ', c.note as note_private, c.note_public, c.ref_client, c.ref_ext, c.ref_int, c.model_pdf, c.fk_adresse_livraison, c.extraparams'; + $sql.= ', c.note as note_private, c.note_public, c.ref_client, c.ref_ext, c.ref_int, c.model_pdf, c.fk_delivery_address, c.extraparams'; $sql.= ', p.code as mode_reglement_code, p.libelle as mode_reglement_libelle'; $sql.= ', cr.code as cond_reglement_code, cr.libelle as cond_reglement_libelle, cr.libelle_facture as cond_reglement_libelle_doc'; $sql.= ', ca.code as availability_code'; @@ -1301,7 +1301,7 @@ class Commande extends CommonOrder $this->demand_reason_id = $obj->fk_input_reason; $this->demand_reason_code = $obj->demand_reason_code; $this->date_livraison = $this->db->jdate($obj->date_livraison); - $this->fk_delivery_address = $obj->fk_adresse_livraison; + $this->fk_delivery_address = $obj->fk_delivery_address; $this->extraparams = (array) json_decode($obj->extraparams, true); diff --git a/htdocs/install/mysql/tables/llx_commande.sql b/htdocs/install/mysql/tables/llx_commande.sql index bc5312b1fe2..0ef0eddb739 100644 --- a/htdocs/install/mysql/tables/llx_commande.sql +++ b/htdocs/install/mysql/tables/llx_commande.sql @@ -63,7 +63,7 @@ create table llx_commande date_livraison date default NULL, fk_availability integer NULL, fk_input_reason integer, - fk_adresse_livraison integer, -- delivery address (deprecated) + fk_delivery_address integer, -- delivery address (deprecated) import_key varchar(14), extraparams varchar(255) -- for stock other parameters with json format From 2bfd6c40d0e7bba5f05f06a96580360057749b30 Mon Sep 17 00:00:00 2001 From: Grand Philippe Date: Fri, 15 Feb 2013 19:26:09 +0100 Subject: [PATCH 5/7] fix trad : change adresse versus address --- htdocs/compta/dons/class/don.class.php | 20 +++++++++---------- htdocs/compta/dons/fiche.php | 10 +++++----- .../modules/dons/html_cerfafr.modules.php | 2 +- htdocs/install/mysql/tables/llx_don.sql | 2 +- 4 files changed, 17 insertions(+), 17 deletions(-) diff --git a/htdocs/compta/dons/class/don.class.php b/htdocs/compta/dons/class/don.class.php index e4ee40df7c3..4942c8f3f7e 100644 --- a/htdocs/compta/dons/class/don.class.php +++ b/htdocs/compta/dons/class/don.class.php @@ -42,7 +42,7 @@ class Don extends CommonObject var $prenom; var $nom; var $societe; - var $adresse; + var $address; var $cp; var $ville; var $pays; @@ -188,7 +188,7 @@ class Don extends CommonObject $this->amount = 100; $this->public = 1; $this->societe = 'The Company'; - $this->adresse = 'Twist road'; + $this->address = 'Twist road'; $this->cp = '99999'; $this->ville = 'Town'; $this->note_public='SPECIMEN'; @@ -217,7 +217,7 @@ class Don extends CommonObject } } - if (dol_strlen(trim($this->adresse)) == 0) + if (dol_strlen(trim($this->address)) == 0) { $error_string[$err] = "L'adresse saisie est invalide"; $err++; @@ -297,7 +297,7 @@ class Don extends CommonObject global $conf; // Clean parameters - $this->address=($this->address>0?$this->address:$this->adresse); + $this->address=($this->address>0?$this->address:$this->address); $this->zip=($this->zip>0?$this->zip:$this->cp); $this->town=($this->town>0?$this->town:$this->ville); $this->country_id=($this->country_id>0?$this->country_id:$this->fk_pays); @@ -313,7 +313,7 @@ class Don extends CommonObject $sql.= ", prenom"; $sql.= ", nom"; $sql.= ", societe"; - $sql.= ", adresse"; + $sql.= ", address"; $sql.= ", cp"; $sql.= ", ville"; $sql.= ", pays"; @@ -334,7 +334,7 @@ class Don extends CommonObject $sql.= ", '".$this->db->escape($this->prenom)."'"; $sql.= ", '".$this->db->escape($this->nom)."'"; $sql.= ", '".$this->db->escape($this->societe)."'"; - $sql.= ", '".$this->db->escape($this->adresse)."'"; + $sql.= ", '".$this->db->escape($this->address)."'"; $sql.= ", '".$this->db->escape($this->zip)."'"; $sql.= ", '".$this->db->escape($this->town)."'"; $sql.= ", '".$this->db->escape($this->country)."'"; // TODO use country_id @@ -382,7 +382,7 @@ class Don extends CommonObject function update($user) { // Clean parameters - $this->address=($this->address>0?$this->address:$this->adresse); + $this->address=($this->address>0?$this->address:$this->address); $this->zip=($this->zip>0?$this->zip:$this->cp); $this->town=($this->town>0?$this->town:$this->ville); $this->country_id=($this->country_id>0?$this->country_id:$this->fk_pays); @@ -394,7 +394,7 @@ class Don extends CommonObject $sql .= ",prenom = '".$this->db->escape($this->prenom)."'"; $sql .= ",nom='".$this->db->escape($this->nom)."'"; $sql .= ",societe='".$this->db->escape($this->societe)."'"; - $sql .= ",adresse='".$this->db->escape($this->address)."'"; + $sql .= ",address='".$this->db->escape($this->address)."'"; $sql .= ",cp='".$this->db->escape($this->zip)."'"; $sql .= ",ville='".$this->db->escape($this->town)."'"; $sql .= ",pays='".$this->db->escape($this->country)."'"; // TODO use country_id @@ -463,7 +463,7 @@ class Don extends CommonObject global $conf; $sql = "SELECT d.rowid, d.datec, d.tms as datem, d.datedon,"; - $sql.= " d.prenom, d.nom, d.societe, d.amount, d.fk_statut, d.adresse, d.cp, d.ville, d.pays, d.public, d.amount, d.fk_paiement, d.note, cp.libelle, d.email, d.phone, d.phone_mobile, d.fk_don_projet,"; + $sql.= " d.prenom, d.nom, d.societe, d.amount, d.fk_statut, d.address, d.cp, d.ville, d.pays, d.public, d.amount, d.fk_paiement, d.note, cp.libelle, d.email, d.phone, d.phone_mobile, d.fk_don_projet,"; $sql.= " p.title as project_label"; $sql.= " FROM ".MAIN_DB_PREFIX."don as d"; $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."projet as p ON p.rowid = d.fk_don_projet"; @@ -487,7 +487,7 @@ class Don extends CommonObject $this->nom = $obj->nom; $this->societe = $obj->societe; $this->statut = $obj->fk_statut; - $this->adresse = $obj->adresse; + $this->address = $obj->address; $this->cp = $obj->cp; $this->ville = $obj->ville; $this->zip = $obj->cp; diff --git a/htdocs/compta/dons/fiche.php b/htdocs/compta/dons/fiche.php index 6ba13a19631..5ea563fbf14 100644 --- a/htdocs/compta/dons/fiche.php +++ b/htdocs/compta/dons/fiche.php @@ -88,7 +88,7 @@ if ($action == 'update') $don->prenom = $_POST["prenom"]; $don->nom = $_POST["nom"]; $don->societe = $_POST["societe"]; - $don->adresse = $_POST["adresse"]; + $don->address = $_POST["address"]; $don->amount = price2num($_POST["amount"]); $don->cp = $_POST["zipcode"]; $don->ville = $_POST["town"]; @@ -140,7 +140,7 @@ if ($action == 'add') $don->prenom = $_POST["prenom"]; $don->nom = $_POST["nom"]; $don->societe = $_POST["societe"]; - $don->adresse = $_POST["adresse"]; + $don->address = $_POST["address"]; $don->amount = price2num($_POST["amount"]); $don->cp = $_POST["zipcode"]; $don->ville = $_POST["town"]; @@ -300,7 +300,7 @@ if ($action == 'create') print "".''.$langs->trans("Firstname").''; print "".''.$langs->trans("Lastname").''; print "".''.$langs->trans("Address").''; - print ''; + print ''; // Zip / Town print ''.$langs->trans("Zip").' / '.$langs->trans("Town").''; @@ -390,7 +390,7 @@ if (! empty($id) && $action == 'edit') print "".''.$langs->trans("Firstname").''; print "".''.$langs->trans("Lastname").''; print "".''.$langs->trans("Address").''; - print ''; + print ''; // Zip / Town print ''.$langs->trans("Zip").' / '.$langs->trans("Town").''; @@ -485,7 +485,7 @@ if (! empty($id) && $action != 'edit') print "".''.$langs->trans("Company").''.$don->societe.''; print "".''.$langs->trans("Firstname").''.$don->prenom.''; print "".''.$langs->trans("Lastname").''.$don->nom.''; - print "".''.$langs->trans("Address").''.dol_nl2br($don->adresse).''; + print "".''.$langs->trans("Address").''.dol_nl2br($don->address).''; // Zip / Town print "".''.$langs->trans("Zip").' / '.$langs->trans("Town").''.$don->cp.($don->cp && $don->ville?' / ':'').$don->ville.''; diff --git a/htdocs/core/modules/dons/html_cerfafr.modules.php b/htdocs/core/modules/dons/html_cerfafr.modules.php index 47aa150dc4d..cf71f536593 100644 --- a/htdocs/core/modules/dons/html_cerfafr.modules.php +++ b/htdocs/core/modules/dons/html_cerfafr.modules.php @@ -144,7 +144,7 @@ class html_cerfafr extends ModeleDon $form = str_replace('__MAIN_INFO_SOCIETE_CP__',$mysoc->zip,$form); $form = str_replace('__MAIN_INFO_SOCIETE_VILLE__',$mysoc->town,$form); $form = str_replace('__DONATOR_NAME__',$don->nom,$form); - $form = str_replace('__DONATOR_ADDRESS__',$don->adresse,$form); + $form = str_replace('__DONATOR_ADDRESS__',$don->address,$form); $form = str_replace('__DONATOR_ZIP__',$don->cp,$form); $form = str_replace('__DONATOR_TOWN__',$don->ville,$form); $form = str_replace('__PAYMENTMODE_LIB__ ', $paymentmode,$form); diff --git a/htdocs/install/mysql/tables/llx_don.sql b/htdocs/install/mysql/tables/llx_don.sql index 60f977e886d..d23d112ee1b 100644 --- a/htdocs/install/mysql/tables/llx_don.sql +++ b/htdocs/install/mysql/tables/llx_don.sql @@ -33,7 +33,7 @@ create table llx_don prenom varchar(50), nom varchar(50), societe varchar(50), - adresse text, + address text, cp varchar(30), ville varchar(50), pays varchar(50), From 785e72d5339077aeb43bb36629dd9fe26bdf6fea Mon Sep 17 00:00:00 2001 From: Grand Philippe Date: Fri, 15 Feb 2013 19:36:09 +0100 Subject: [PATCH 6/7] fix trad : change adresse versus address --- htdocs/comm/propal/class/propal.class.php | 10 +++++----- htdocs/install/mysql/tables/llx_propal.sql | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/htdocs/comm/propal/class/propal.class.php b/htdocs/comm/propal/class/propal.class.php index 90ba3f93690..230e696bf10 100644 --- a/htdocs/comm/propal/class/propal.class.php +++ b/htdocs/comm/propal/class/propal.class.php @@ -90,7 +90,7 @@ class Propal extends CommonObject var $fk_delivery_address; // deprecated (for compatibility) var $fk_address; var $address_type; - var $adresse; + var $address; var $availability_id; var $availability_code; var $demand_reason_id; @@ -789,7 +789,7 @@ class Propal extends CommonObject if (! $error && $this->fk_delivery_address) { $sql = "UPDATE ".MAIN_DB_PREFIX."propal"; - $sql.= " SET fk_adresse_livraison = ".$this->fk_delivery_address; + $sql.= " SET fk_delivery_address = ".$this->fk_delivery_address; $sql.= " WHERE ref = '".$this->ref."'"; $sql.= " AND entity = ".$conf->entity; @@ -985,7 +985,7 @@ class Propal extends CommonObject $sql.= ", p.note as note_private, p.note_public"; $sql.= ", p.fk_projet, p.fk_statut"; $sql.= ", p.fk_user_author, p.fk_user_valid, p.fk_user_cloture"; - $sql.= ", p.fk_adresse_livraison"; + $sql.= ", p.fk_delivery_address"; $sql.= ", p.fk_availability"; $sql.= ", p.fk_input_reason"; $sql.= ", p.fk_cond_reglement"; @@ -1049,8 +1049,8 @@ class Propal extends CommonObject $this->demand_reason_id = $obj->fk_input_reason; $this->demand_reason_code = $obj->demand_reason_code; $this->demand_reason = $obj->demand_reason; - $this->fk_delivery_address = $obj->fk_adresse_livraison; // TODO obsolete - $this->fk_address = $obj->fk_adresse_livraison; + //$this->fk_delivery_address = $obj->fk_adresse_livraison; // TODO obsolete + $this->fk_address = $obj->fk_delivery_address; $this->mode_reglement_id = $obj->fk_mode_reglement; $this->mode_reglement_code = $obj->mode_reglement_code; diff --git a/htdocs/install/mysql/tables/llx_propal.sql b/htdocs/install/mysql/tables/llx_propal.sql index 9c4a440c23b..2964e768e47 100644 --- a/htdocs/install/mysql/tables/llx_propal.sql +++ b/htdocs/install/mysql/tables/llx_propal.sql @@ -65,6 +65,6 @@ create table llx_propal fk_input_reason integer, import_key varchar(14), extraparams varchar(255), -- for stock other parameters with json format - fk_adresse_livraison integer -- delivery address (deprecated) + fk_delivery_address integer -- delivery address (deprecated) )ENGINE=innodb; From ab2b06117bc390d3215011ba406e5cd46ebba2f9 Mon Sep 17 00:00:00 2001 From: Grand Philippe Date: Fri, 15 Feb 2013 19:56:51 +0100 Subject: [PATCH 7/7] fix trad : change adresse versus address --- htdocs/contact/class/contact.class.php | 2 +- htdocs/core/class/CMailFile.class.php | 6 +++--- htdocs/core/class/commonobject.class.php | 2 +- htdocs/expedition/class/expedition.class.php | 4 ++-- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/htdocs/contact/class/contact.class.php b/htdocs/contact/class/contact.class.php index 14c8630e1e5..411de5d5fcd 100644 --- a/htdocs/contact/class/contact.class.php +++ b/htdocs/contact/class/contact.class.php @@ -520,7 +520,7 @@ class Contact extends CommonObject $this->prenom = $obj->firstname; // TODO deprecated $this->address = $obj->address; - $this->adresse = $obj->address; // TODO deprecated + //$this->adresse = $obj->address; // TODO deprecated $this->cp = $obj->zip; // TODO deprecated $this->zip = $obj->zip; $this->ville = $obj->town; // TODO deprecated diff --git a/htdocs/core/class/CMailFile.class.php b/htdocs/core/class/CMailFile.class.php index 9165b082679..a9337c87b8b 100644 --- a/htdocs/core/class/CMailFile.class.php +++ b/htdocs/core/class/CMailFile.class.php @@ -1020,7 +1020,7 @@ class CMailFile /** * Return an address for SMTP protocol * - * @param string $adresses Example: 'John Doe ' or 'john@doe.com' + * @param string $address Example: 'John Doe ' or 'john@doe.com' * @param int $format 0=auto, 1=emails with <>, 2=emails without <>, 3=auto + label between " * @param int $encode 1=Encode name to RFC2822 * @return string If format 0: '' or 'John Doe ' or '=?UTF-8?B?Sm9obiBEb2U=?= ' @@ -1028,13 +1028,13 @@ class CMailFile * If format 2: 'john@doe.com' * If format 3: '' or '"John Doe" ' or '"=?UTF-8?B?Sm9obiBEb2U=?=" ' */ - function getValidAddress($adresses,$format,$encode='') + function getValidAddress($address,$format,$encode='') { global $conf; $ret=''; - $arrayaddress=explode(',',$adresses); + $arrayaddress=explode(',',$address); // Boucle sur chaque composant de l'adresse foreach($arrayaddress as $val) diff --git a/htdocs/core/class/commonobject.class.php b/htdocs/core/class/commonobject.class.php index 5d6d869ad81..8184e186999 100644 --- a/htdocs/core/class/commonobject.class.php +++ b/htdocs/core/class/commonobject.class.php @@ -964,7 +964,7 @@ abstract class CommonObject */ function setDeliveryAddress($id) { - $fieldname = 'fk_adresse_livraison'; + $fieldname = 'fk_delivery_address'; if ($this->element == 'delivery' || $this->element == 'shipping') $fieldname = 'fk_address'; $sql = "UPDATE ".MAIN_DB_PREFIX.$this->table_element." SET ".$fieldname." = ".$id; diff --git a/htdocs/expedition/class/expedition.class.php b/htdocs/expedition/class/expedition.class.php index 7c9a5917727..1f890d2da3d 100644 --- a/htdocs/expedition/class/expedition.class.php +++ b/htdocs/expedition/class/expedition.class.php @@ -675,7 +675,7 @@ class Expedition extends CommonObject if (isset($this->socid)) $this->socid=trim($this->socid); if (isset($this->fk_user_author)) $this->fk_user_author=trim($this->fk_user_author); if (isset($this->fk_user_valid)) $this->fk_user_valid=trim($this->fk_user_valid); - if (isset($this->fk_adresse_livraison)) $this->fk_adresse_livraison=trim($this->fk_adresse_livraison); + if (isset($this->fk_delivery_address)) $this->fk_delivery_address=trim($this->fk_delivery_address); if (isset($this->expedition_method_id)) $this->expedition_method_id=trim($this->expedition_method_id); if (isset($this->tracking_number)) $this->tracking_number=trim($this->tracking_number); if (isset($this->statut)) $this->statut=trim($this->statut); @@ -706,7 +706,7 @@ class Expedition extends CommonObject $sql.= " fk_user_valid=".(isset($this->fk_user_valid)?$this->fk_user_valid:"null").","; $sql.= " date_expedition=".(dol_strlen($this->date_expedition)!=0 ? "'".$this->db->idate($this->date_expedition)."'" : 'null').","; $sql.= " date_delivery=".(dol_strlen($this->date_delivery)!=0 ? "'".$this->db->idate($this->date_delivery)."'" : 'null').","; - $sql.= " fk_address=".(isset($this->fk_adresse_livraison)?$this->fk_adresse_livraison:"null").","; + $sql.= " fk_address=".(isset($this->fk_delivery_address)?$this->fk_delivery_address:"null").","; $sql.= " fk_expedition_methode=".((isset($this->expedition_method_id) && $this->expedition_method_id > 0)?$this->expedition_method_id:"null").","; $sql.= " tracking_number=".(isset($this->tracking_number)?"'".$this->db->escape($this->tracking_number)."'":"null").","; $sql.= " fk_statut=".(isset($this->statut)?$this->statut:"null").",";