Skip to content

Commit

Permalink
fix trad : change adresse versus address
Browse files Browse the repository at this point in the history
  • Loading branch information
grandoc committed Feb 15, 2013
1 parent 785e72d commit ab2b061
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion htdocs/contact/class/contact.class.php
Expand Up @@ -520,7 +520,7 @@ function fetch($id, $user=0)
$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
Expand Down
6 changes: 3 additions & 3 deletions htdocs/core/class/CMailFile.class.php
Expand Up @@ -1020,21 +1020,21 @@ function findHtmlImages($images_dir)
/**
* Return an address for SMTP protocol
*
* @param string $adresses Example: 'John Doe <john@doe.com>' or 'john@doe.com'
* @param string $address Example: 'John Doe <john@doe.com>' 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: '<john@doe.com>' or 'John Doe <john@doe.com>' or '=?UTF-8?B?Sm9obiBEb2U=?= <john@doe.com>'
* If format 1: '<john@doe.com>'
* If format 2: 'john@doe.com'
* If format 3: '<john@doe.com>' or '"John Doe" <john@doe.com>' or '"=?UTF-8?B?Sm9obiBEb2U=?=" <john@doe.com>'
*/
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)
Expand Down
2 changes: 1 addition & 1 deletion htdocs/core/class/commonobject.class.php
Expand Up @@ -964,7 +964,7 @@ function setPaymentTerms($id)
*/
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;
Expand Down
4 changes: 2 additions & 2 deletions htdocs/expedition/class/expedition.class.php
Expand Up @@ -675,7 +675,7 @@ function update($user=0, $notrigger=0)
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);
Expand Down Expand Up @@ -706,7 +706,7 @@ function update($user=0, $notrigger=0)
$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").",";
Expand Down

0 comments on commit ab2b061

Please sign in to comment.